/ src / modules / Workspaces / WorkspacesEditor / HeadingTextBlock.cs
HeadingTextBlock.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System.Windows;
 6  using System.Windows.Automation.Peers;
 7  using System.Windows.Controls;
 8  
 9  namespace WorkspacesEditor
10  {
11      public class HeadingTextBlock : TextBlock
12      {
13          protected override AutomationPeer OnCreateAutomationPeer()
14          {
15              return new HeadingTextBlockAutomationPeer(this);
16          }
17  
18          internal sealed class HeadingTextBlockAutomationPeer : TextBlockAutomationPeer
19          {
20              public HeadingTextBlockAutomationPeer(HeadingTextBlock owner)
21                  : base(owner)
22              {
23              }
24  
25              protected override AutomationControlType GetAutomationControlTypeCore()
26              {
27                  return AutomationControlType.Header;
28              }
29          }
30      }
31  }