File: Options\TextBlockWithDataItemControlType.cs
Web Access
Project: src\src\VisualStudio\Core\Impl\Microsoft.VisualStudio.LanguageServices.Implementation.csproj (Microsoft.VisualStudio.LanguageServices.Implementation)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
 
#nullable disable
 
using System.Windows.Automation.Peers;
using System.Windows.Controls;
 
namespace Microsoft.VisualStudio.LanguageServices.Implementation.Options;
 
internal sealed class TextBlockWithDataItemControlType : TextBlock
{
    protected override AutomationPeer OnCreateAutomationPeer()
        => new TextBlockWithDataItemControlTypeAutomationPeer(this);
 
    private sealed class TextBlockWithDataItemControlTypeAutomationPeer : TextBlockAutomationPeer
    {
        public TextBlockWithDataItemControlTypeAutomationPeer(TextBlock owner) : base(owner)
        {
        }
 
        protected override AutomationControlType GetAutomationControlTypeCore()
            => AutomationControlType.DataItem;
    }
}