Freigeben über


FrameworkElementAutomationPeer.Owner Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the UIElement that is associated with this FrameworkElementAutomationPeer.

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

Syntax

'Declaration
Public ReadOnly Property Owner As UIElement
public UIElement Owner { get; }

Property Value

Type: System.Windows.UIElement
The element that owns this peer class.

Remarks

This value is set only by the constructor.

In some cases, peer implementations access properties of the owner object in order to generate values that are reported by the peer. It is appropriate to make assumptions about the type of the owner control, if you also implement that control. In other words, if you are also creating the association between peer and control through implementation of OnCreateAutomationPeer(), then you have some influence over what Owner will be when the peer is created. However, peer implementers should also account for the possibility that derived controls will also access the peer associated with the base class through the default OnCreateAutomationPeer() implementation, without defining a new peer of their own.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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