// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Diagnostics.CodeAnalysis; using System.Windows.Automation.Peers; using System.Windows.Controls; namespace Microsoft.Management.UI.Internal { /// /// Provides an automation peer for AutomationTextBlock. /// [SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")] internal class AutomationTextBlockAutomationPeer : TextBlockAutomationPeer { #region Structors /// /// Initializes a new instance of the class. /// /// The owner of the automation peer. public AutomationTextBlockAutomationPeer(TextBlock owner) : base(owner) { // This constructor intentionally left blank } #endregion #region Overrides /// /// Gets a value that indicates whether the element is understood by the user as interactive or as contributing to the logical structure of the control in the GUI. Called by IsControlElement(). /// /// This method always returns true. protected override bool IsControlElementCore() { return true; } /// /// Gets the class name. /// /// The class name. protected override string GetClassNameCore() { return this.Owner.GetType().Name; } #endregion } }