Windows Dev Center

FrameworkElementAutomationPeer.Owner Property

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Gets the UIElement that is associated with this FrameworkElementAutomationPeer.

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

public UIElement Owner { get; }

Property Value

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

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft