Поделиться через


TextBlockAutomationPeer.IsControlElementCore Method

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

Gets a value that indicates whether the TextBlock associated with this peer is understood by the user as interactive or as contributing to the logical structure of the UI.

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

Syntax

'Declaration
Protected Overrides Function IsControlElementCore As Boolean
protected override bool IsControlElementCore()

Return Value

Type: System.Boolean
false if the element is part of an applied template; otherwise, true.

Remarks

In terms of strict definition of the control model, TextBlock is not a control in either Silverlight or WPF, because it derives from FrameworkElement, not Control. Silverlight and WPF both implement a behavior for this method whereby a TextBlock reports IsControlElementCore as true if the TextBlock is a declarative part of the UI, but returns false if the TextBlock is part of the template and control composition for another control. This method is called by IsControlElement.

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.