FrameworkElementAutomationPeer.GetClassNameCore Method

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

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns the name of the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetClassName.

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

Syntax

Protected Overrides Function GetClassNameCore As String
protected override string GetClassNameCore()

Return Value

Type: System..::.String
The name of the owner type that is associated with this FrameworkElementAutomationPeer. See "Notes for Inheritors".

Remarks

Notes to Inheritors

The return value for this method in the FrameworkElementAutomationPeer implementation comes from an internal property store, and it returns an empty string. Specific subclasses generally override this method again and return the class name of the owner type for the automation peer. There are two general patterns: return a string that is coded into the implementation, for example "Button"; call Owner.GetType().Name. The latter approach is appropriate if your peer is otherwise suitable for use on subclasses of its primary owner control type. In this case the dynamic value for ClassName saves the control subclasser from having to re-implement that aspect of the automation peer.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

FrameworkElementAutomationPeer Class

System.Windows.Automation.Peers Namespace