AutomationProperties.HeadingLevelProperty AutomationProperties.HeadingLevelProperty AutomationProperties.HeadingLevelProperty AutomationProperties.HeadingLevelProperty Property

Definition

Gets the identifier for the HeadingLevel attached property, which indicates the heading level for a UI Automation element.

public : static DependencyProperty HeadingLevelProperty { get; }
static DependencyProperty HeadingLevelProperty();
public static DependencyProperty HeadingLevelProperty { get; }
Public Shared ReadOnly Property HeadingLevelProperty As DependencyProperty

Property Value

The identifier for the HeadingLevel attached property.

Additional features and requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Examples

<TextBlock 
    Text="Mouse Options"
    AutomationProperties.HeadingLevel="1"/>
</TextBlock>

<StackPanel AutomationProperties.AutomationName="Description of Content"  AutomationProperties.HeadingLevel="1">
    <!-- content here -->
</StackPanel>
public sealed partial class MainPage : Page
{
    public MainPage()
    {
        this.InitializeComponent();

        AutomationProperties.SetHeadingLevel(AutomationHeadingLevel.HeadingLevel3);
    }
}

Remarks

Heading elements organize the user interface and make it easier to navigate. Some assistive technology (AT) allows users to quickly jump between headings. Headings have a level from 1 to 9.

The heading level property value is returned by the GetHeadingLevel method.

See also