Implementing the UI Automation Transform Control Pattern

 
System_CAPS_ICON_note.jpg Note

This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.

This topic introduces guidelines and conventions for implementing ITransformProvider, including information about properties, methods, and events. Links to additional references are listed at the end of the topic.

The TransformPattern control pattern is used to support controls that can be moved, resized, or rotated within a two-dimensional space. For examples of controls that implement this control pattern, see Control Pattern Mapping for UI Automation Clients.

When implementing the Transform control pattern, note the following guidelines and conventions:

  • Support for this control pattern is not limited to objects on the desktop. This control pattern must also be supported by the children of a container object if the children can be moved, resized, or rotated freely within the boundaries of the container.

  • An object cannot be moved, resized, or rotated such that its resulting screen location would be completely outside the coordinates of its container and therefore inaccessible to the keyboard or mouse (for example, when a top-level window is moved off-screen or a child object is moved outside the boundaries of the container's viewport). In these cases, the object is placed as close to the requested screen coordinates as possible with the top or left coordinates overridden to be within the container boundaries.

  • For multi-monitor systems, if an object is moved, resized, or rotated completely outside the combined desktop screen coordinates, the object is placed on the primary monitor as close to the requested coordinates as possible.

  • All parameters and property values are absolute and independent of locale.

The following properties and methods are required for implementing ITransformProvider.

Required membersMember typeNotes
CanMovePropertyNone
CanResizePropertyNone
CanRotatePropertyNone
MoveMethodNone
ResizeMethodNone
RotateMethodNone

This control pattern has no associated events.

Providers must throw the following exceptions.

Exception TypeCondition
InvalidOperationExceptionMove

- If the CanMoveProperty is false.
InvalidOperationExceptionResize

- If the CanResizeProperty is false.
InvalidOperationExceptionRotate

- If the CanRotateProperty is false.

UI Automation Control Patterns Overview
Support Control Patterns in a UI Automation Provider
UI Automation Control Patterns for Clients
UI Automation Tree Overview
Use Caching in UI Automation

Show: