Export (0) Print
Expand All

ItemAutomationPeer Class

Exposes a data item in an Items collection to UI automation.

Namespace:  System.Windows.Automation.Peers
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public MustInherit Class ItemAutomationPeer _
	Inherits FrameworkElementAutomationPeer

The ItemAutomationPeer type exposes the following members.

  NameDescription
Protected methodSupported by Silverlight for Windows PhoneItemAutomationPeer(UIElement)Provides initialization for base class values when called by the constructor of a derived class.
Protected methodSupported by Silverlight for Windows PhoneItemAutomationPeer(Object, ItemsControlAutomationPeer)Provides initialization for base class values when called by the constructor of a derived class.
Top

  NameDescription
Public propertySupported by Silverlight for Windows PhoneDispatcherGets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
Public propertySupported by Silverlight for Windows PhoneEventsSourceGets or sets an AutomationPeer that is reported to the automation client as a source for all the events that come from this AutomationPeer. (Inherited from AutomationPeer.)
Protected propertySupported by Silverlight for Windows PhoneItemGets the requested data item in the Items collection that is associated with this ItemAutomationPeer.
Protected propertySupported by Silverlight for Windows PhoneItemsControlAutomationPeerGets the ItemsControlAutomationPeer that is associated with the ItemsControl for this peer's Items.
Public propertySupported by Silverlight for Windows PhoneOwnerGets the UIElement that is associated with this FrameworkElementAutomationPeer. (Inherited from FrameworkElementAutomationPeer.)
Top

  NameDescription
Public methodSupported by Silverlight for Windows PhoneCheckAccessDetermines whether the calling thread has access to this object. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneClearValueClears the local value of a dependency property. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetAcceleratorKeyGets the accelerator key combination for the object that is associated with the UI Automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetAcceleratorKeyCoreReturns the accelerator key for the item element that is associated with this ItemAutomationPeer. This method is called by GetAcceleratorKey. (Overrides FrameworkElementAutomationPeer.GetAcceleratorKeyCore.)
Public methodSupported by Silverlight for Windows PhoneGetAccessKeyGets the access key for the object that is associated with the automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetAccessKeyCoreReturns the access key for the item element that is associated with this ItemAutomationPeer. This method is called by GetAccessKey. (Overrides FrameworkElementAutomationPeer.GetAccessKeyCore.)
Public methodSupported by Silverlight for Windows PhoneGetAnimationBaseValueReturns any base value established for a Silverlight dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneGetAutomationControlTypeGets the control type for the object that is associated with the UI Automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetAutomationControlTypeCoreReturns the control type for the item element that is associated with this ItemAutomationPeer. This method is called by GetAutomationControlType. (Overrides FrameworkElementAutomationPeer.GetAutomationControlTypeCore.)
Public methodSupported by Silverlight for Windows PhoneGetAutomationIdGets the AutomationId of the object that is associated with the automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetAutomationIdCoreReturns the string that uniquely identifies the item element that is associated with this ItemAutomationPeer. This method is called by GetAutomationId. (Overrides FrameworkElementAutomationPeer.GetAutomationIdCore.)
Public methodSupported by Silverlight for Windows PhoneGetBoundingRectangleGets the Rect object that represents the screen coordinates of the element that is associated with the automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetBoundingRectangleCoreReturns the Rect that represents the bounding rectangle of the item element that is associated with this ItemAutomationPeer. This method is called by GetBoundingRectangle. (Overrides FrameworkElementAutomationPeer.GetBoundingRectangleCore.)
Public methodSupported by Silverlight for Windows PhoneGetChildrenGets the collection of child elements that are represented in the UI Automation tree as immediate child elements of the automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetChildrenCoreReturns automation peers for the collection of child elements of the owner. The owner class is associated with the ItemAutomationPeer. This method is called by GetChildren. (Overrides FrameworkElementAutomationPeer.GetChildrenCore.)
Public methodSupported by Silverlight for Windows PhoneGetClassNameGets the name of the control class that is associated with the peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetClassNameCoreReturns name of the class that is associated with this ItemAutomationPeer. This method is called by GetClassName. (Overrides FrameworkElementAutomationPeer.GetClassNameCore.)
Public methodSupported by Silverlight for Windows PhoneGetClickablePointGets a Point on the object that is associated with the automation peer that responds to a mouse click. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetClickablePointCoreReturns a Point that represents the clickable space for the item element that is associated with this ItemAutomationPeer. This method is called by GetClickablePoint. (Overrides FrameworkElementAutomationPeer.GetClickablePointCore.)
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetHelpTextGets text that describes the functionality of the control that is associated with the automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetHelpTextCoreReturns the string that describes the functionality of the item element that is associated with this ItemAutomationPeer. his method is called by GetHelpText. (Overrides FrameworkElementAutomationPeer.GetHelpTextCore.)
Public methodSupported by Silverlight for Windows PhoneGetItemStatusGets text that conveys the visual status of the object that is associated with this automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetItemStatusCoreReturns a string that communicates the visual status of the item element that is associated with this ItemAutomationPeer. This method is called by GetItemStatus. (Overrides FrameworkElementAutomationPeer.GetItemStatusCore.)
Public methodSupported by Silverlight for Windows PhoneGetItemTypeGets a string that describes what kind of item an element represents. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetItemTypeCoreReturns a human-readable string that contains the type of item element that the item represents. This method is called by GetItemType. (Overrides FrameworkElementAutomationPeer.GetItemTypeCore.)
Public methodSupported by Silverlight for Windows PhoneGetLabeledByGets the AutomationPeer for the UIElement that is targeted to the element. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetLabeledByCoreReturns the AutomationPeer for the object that targets the item that is associated with this ItemAutomationPeer. This method is called by GetLabeledBy. (Overrides FrameworkElementAutomationPeer.GetLabeledByCore.)
Public methodSupported by Silverlight for Windows PhoneGetLocalizedControlTypeGets a localized string that represents the control type, for the control that is associated with this automation peer. The localized string parallels a AutomationControlType value. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetLocalizedControlTypeCoreReturns a localized human-readable string that represents a control type. The control is the owner type that is associated with this ItemAutomationPeer. This method is called by GetLocalizedControlType. (Overrides FrameworkElementAutomationPeer.GetLocalizedControlTypeCore.)
Public methodSupported by Silverlight for Windows PhoneGetNameGets the value that the automation peer reports as the UI Automation Name for the associated control. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetNameCoreGets the UI Automation Name from the element that corresponds to a data item. The item is the element in an Items collection that is associated with this ItemAutomationPeer. This method is called by GetName. (Overrides FrameworkElementAutomationPeer.GetNameCore.)
Public methodSupported by Silverlight for Windows PhoneGetOrientationGets a value that indicates the explicit control orientation, if any. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneGetOrientationCoreReturns a value that indicates whether the element that is associated with this ItemAutomationPeer is laid out in a specific direction. This method is called by GetOrientation. (Overrides FrameworkElementAutomationPeer.GetOrientationCore.)
Public methodSupported by Silverlight for Windows PhoneGetParentGets the AutomationPeer that is the parent of this AutomationPeer. (Inherited from AutomationPeer.)
Public methodSupported by Silverlight for Windows PhoneGetPatternReturns an object that supports the requested pattern, based on the patterns supported by this ItemAutomationPeer. (Overrides FrameworkElementAutomationPeer.GetPattern(PatternInterface).)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetValueReturns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneHasKeyboardFocusGets a value that indicates whether the object that is associated with this automation peer currently has keyboard focus. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneHasKeyboardFocusCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer currently has keyboard input focus. This method is called by HasKeyboardFocus. (Overrides FrameworkElementAutomationPeer.HasKeyboardFocusCore.)
Public methodSupported by Silverlight for Windows PhoneInvalidatePeerTriggers recalculation of the main properties of the AutomationPeer and raises the PropertyChanged notification to the automation client if the properties have changed. (Inherited from AutomationPeer.)
Public methodSupported by Silverlight for Windows PhoneIsContentElementGets a value that indicates whether the object that is associated with this automation peer contains data that is presented to the user. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsContentElementCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer is an element that contains data that is presented to the user. This method is called by IsContentElement. (Overrides FrameworkElementAutomationPeer.IsContentElementCore.)
Public methodSupported by Silverlight for Windows PhoneIsControlElementGets a value that indicates whether the element is understood by the user as interactive or as contributing to the logical structure of the control in the GUI. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsControlElementCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer is understood by the end user as interactive. Optionally, the user might understand the element as contributing to the logical structure of the control in the GUI. This method is called by IsControlElement. (Overrides FrameworkElementAutomationPeer.IsControlElementCore.)
Public methodSupported by Silverlight for Windows PhoneIsEnabledGets a value that indicates whether the element associated with this automation peer supports interaction. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsEnabledCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer is enabled. This method is called by IsEnabled. (Overrides FrameworkElementAutomationPeer.IsEnabledCore.)
Public methodSupported by Silverlight for Windows PhoneIsKeyboardFocusableGets a value that indicates whether the element can accept keyboard focus. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsKeyboardFocusableCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer can accept keyboard focus. This method is called by IsKeyboardFocusable. (Overrides FrameworkElementAutomationPeer.IsKeyboardFocusableCore.)
Public methodSupported by Silverlight for Windows PhoneIsOffscreenGets a value that indicates whether an element is off the screen. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsOffscreenCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer is off the screen. This method is called by IsOffscreen. (Overrides FrameworkElementAutomationPeer.IsOffscreenCore.)
Public methodSupported by Silverlight for Windows PhoneIsPasswordGets a value that indicates whether the element contains sensitive content. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsPasswordCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer contains protected content. This method is called by IsPassword. (Overrides FrameworkElementAutomationPeer.IsPasswordCore.)
Public methodSupported by Silverlight for Windows PhoneIsRequiredForFormGets a value that indicates whether the object that is associated with this peer must be completed on a form. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneIsRequiredForFormCoreReturns a value that indicates whether the item element that is associated with this ItemAutomationPeer is required to be completed on a form. This method is called by IsRequiredForForm. (Overrides FrameworkElementAutomationPeer.IsRequiredForFormCore.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhonePeerFromProviderGets an AutomationPeer for the specified IRawElementProviderSimple proxy. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneProviderFromPeerGets the IRawElementProviderSimple proxy for the specified AutomationPeer. (Inherited from AutomationPeer.)
Public methodSupported by Silverlight for Windows PhoneRaiseAutomationEventRaises an automation event. (Inherited from AutomationPeer.)
Public methodSupported by Silverlight for Windows PhoneRaisePropertyChangedEventRaises an event to notify the automation client of a changed property value. (Inherited from AutomationPeer.)
Public methodSupported by Silverlight for Windows PhoneReadLocalValueReturns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneSetFocusSets the keyboard focus on the object that is associated with this automation peer. (Inherited from AutomationPeer.)
Protected methodSupported by Silverlight for Windows PhoneSetFocusCoreSets the keyboard input focus on the item element that is associated with this FrameworkElementAutomationPeer. This method is called by SetFocus. (Overrides FrameworkElementAutomationPeer.SetFocusCore.)
Public methodSupported by Silverlight for Windows PhoneSetValueSets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
Public methodSupported by Silverlight for Windows PhoneToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Data items that are not UIElement types do not have full representation in all possible tree metaphors. However, they can have an object tree that is interpreted by a hosting control, and a corresponding automation tree.

For example, a ListBox can have a collection of strings that contain data items. The collection is not a UIElement, nor are the strings. When those items are processed by an ItemsControl for visualization, an object tree is created for them. This object tree can have a corresponding automation tree. After the object tree is created, Silverlight merges the object tree into the remainder of the automation tree. ItemAutomationPeer works with its UIElement counterpart, if it exists, to obtain more information about the UIElement in the automation tree.

Only visible data items, or more precisely, the corresponding UIElement types in object trees, have this dualism: the item might simultaneously have a UI-specific peer as well as an ItemAutomationPeer that forwards information from the type-specific peer for the most part. Nonvisible data items, which have no corresponding UIElement in the object tree, have only their ItemAutomationPeer.

ItemAutomationPeer is abstract, and in general the relevant peers you use for automation will be either ListBoxItemAutomationPeer or TabItemAutomationPeer. ItemAutomationPeer provides the final overrides for most of the FrameworkElementAutomationPeer defined API, with the exception of the API that reports type system information (for example GetNameCore). ItemAutomationPeer is also relevant as a base class if you are implementing an ItemsControl that does not derive from either Selector or TabControl, and need an automation peer class for the items.

Notes to Inheritors

ItemAutomationPeer derives from FrameworkElementAutomationPeer and overrides several FrameworkElementAutomationPeer APIs. Generally the overrides follow a pattern where if the ItemAutomationPeer has a nonnull Owner, then the implementation calls base. If the owner is null, then the implementations check for an associated container and use its automation information if possible. The fallback values if neither of these conditions are true are generally the value defaults for that data type, or otherwise representat that there is not a conventional UI item associated with this item in the automation tree.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft