Freigeben über


DataGridCellAutomationPeer.GetNameCore Method

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

Gets the UI Automation Name from the element that is associated with this DataGridCellAutomationPeer. Called by GetName.

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

Syntax

'Declaration
Protected Overrides Function GetNameCore As String
protected override string GetNameCore()

Return Value

Type: System.String
The UI Automation Name from the element that is associated with this automation peer.

Remarks

The default implementation attempts to cast the owning cell content to TextBlock or TextBox. If these casts succeed, then the implementation returns the Text value. Next, the owning column is cast as DataGridBoundColumn. If this cast succeeds, the implementation returns a string value or string name of the cell based on the evaluated data binding context. Otherwise, the implementation calls base.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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