UIA Custom Patterns: Part 3

In part 2, I talked about how to declare and implement custom methods in UI Automation and promised I would do one more part to wrap it all up.  I’ll introduce two new objects that play an important role in custom patterns and describe how to register the custom patterns.  The samples for this post…


UIA Custom Patterns: Part 2

In part 1, I talked about how to create and use custom properties in UI Automation.  I want to move on now to custom patterns.  In UIA, a pattern (or more formally, a control pattern) is a bundle of properties, methods, and events that go together: a control usually exposes the whole set, or none…


UIA Custom Patterns: Part 1

With this post, I’m starting a new series on how to use custom patterns in UI Automation.  Custom patterns (and custom properties and events) are a new feature of UI Automation added in Windows 7, and I thought it would be interesting to build on my previous samples to show how to use this new…


Porting our provider to the UIA COM API

In this post, I’m going to outline the changes we need to make to our custom UI Automation provider to make it connect to the COM API for UI Automation rather than the managed-code API (UIAutomationProviders.dll.)  The samples for this part are here. Why would you want to use the COM API for a provider,…


Custom UI Automation Providers in Depth: Part 6

In this part, we’ll add the Selection and SelectionItem Patterns to our sample custom control. Compared with all of the hard work of part 5, creating a fragment structure, this part is easy.  So easy, in fact, that I’ll also use this post to talk about UI Automation Events and how to implement them on…


Custom UI Automation Providers in Depth: Part 5

In part 4, we added the Value Pattern to our custom provider.  Now we’re going to learn how to represent items that are contained within our provider.   The sample code for this section is here..  In our example, we want to represent each bar of the tri-color picker as a separate UI element.  In UIA,…


Custom UI Automation Providers in Depth: Part 4

In part 3, we learned how to analyze our control to decide which properties it would be appropriate to support and how to add them. This time, we’ll get into patterns.  The sample code for this section is here. A UIA control pattern is very similar to an interface in object-oriented programming. A control exposes…


Custom UI Automation Providers in Depth: Part 3

In part 2, we created a very simple, “Hello World!” provider.  In this part, we’re going to talk in depth about UI Automation properties and add some to our sample provider.  Properties describe what a UI element is.  They are usually an answer to a question that someone might ask about your UI; understanding the…


Custom UI Automation Providers in Depth: Part 2

In Part 1, we introduced the idea of UI Automation custom control providers and created a TriColor control as a sample.  Now, we’re going to try to add one basic property: the “Hello World!” of UI Automation.  Here’s the sample code for this part. To do this, we need to create a new object, called…


Custom UI Automation Providers in Depth: Part 1

Creating a UI Automation provider for a custom control is not a difficult task. At least, we members of the UI Automation team don’t think so. Yet, it is one that engineers continue to find challenging. And so it seems worth writing a walkthrough. I’ll also post the full code samples on the MSDN Code…