// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Windows.Automation.Peers; using System.Windows.Controls; namespace Microsoft.Management.UI.Internal { /// /// Provides a control that is always visible in the automation tree. /// [SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")] [Description("Provides a System.Windows.Controls.Image control that is always visible in the automation tree.")] public class AutomationImage : Image { #region Constructors /// /// Initializes a new instance of the class. /// public AutomationImage() { // This constructor intentionally left blank } #endregion #region Overides /// /// Returns the implementations for this control. /// /// The implementations for this control. protected override AutomationPeer OnCreateAutomationPeer() { return new AutomationImageAutomationPeer(this); } #endregion } /// /// Provides an automation peer for AutomationImage. /// [SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")] internal class AutomationImageAutomationPeer : ImageAutomationPeer { #region Constructors /// /// Initializes a new instance of the class. /// /// The owner of the automation peer. public AutomationImageAutomationPeer(Image 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 false. protected override bool IsControlElementCore() { return false; } #endregion } }