Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.54 KB

automationproperties_headinglevelproperty.md

File metadata and controls

49 lines (37 loc) · 1.54 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Automation.AutomationProperties.HeadingLevelProperty
winrt property

Microsoft.UI.Xaml.Automation.AutomationProperties.HeadingLevelProperty

-description

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

-property-value

The identifier for the HeadingLevel attached property.

-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

GetHeadingLevel, SetHeadingLevel, Landmarks and Headings

-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(this, AutomationHeadingLevel.HeadingLevel3);
    }
}