In This Article

UserPromptControlAutomationPeer Class

Exposes UserPromptControl types to UI Automation.

public class UserPromptControlAutomationPeer : ControlAutomationPeer, IExpandCollapseProvider, IToggleProvider
Inheritance:
object AutomationPeer ControlAutomationPeer object
Implements:
IExpandCollapseProvider IToggleProvider

Constructors

UserPromptControlAutomationPeer(UserPromptControl)

Initializes a new instance of the UserPromptControlAutomationPeer class.

public UserPromptControlAutomationPeer(UserPromptControl owner)
Parameter Type Description
owner UserPromptControl

The owner.

Properties

ExpandCollapseState

Gets the state, expanded or collapsed, of the control.

public ExpandCollapseState ExpandCollapseState { get; }

Property Value

ExpandCollapseState

Remarks

WindowsIExpandCollapseProvider.ExpandCollapseState
macOSNSAccessibilityProtocol.isAccessibilityExpanded

ToggleState

Gets the toggle state of the control.

public ToggleState ToggleState { get; }

Property Value

ToggleState

Remarks

WindowsIToggleProvider.ToggleState
macOSNSAccessibilityProtocol.accessibilityValue

Methods

Collapse()

Hides all nodes, controls, or content that are descendants of the control.

public void Collapse()

Remarks

WindowsIExpandCollapseProvider.Collapse
macOS Called by setting NSAccessibilityProtocol.setAccessibilityExpanded to false.

Expand()

Displays all child nodes, controls, or content of the control.

public void Expand()

Remarks

WindowsIExpandCollapseProvider.Expand
macOS Called by setting NSAccessibilityProtocol.setAccessibilityExpanded to true, by calling NSAccessibilityProtocol.accessibilityPerformPress, or by calling NSAccessibilityProtocol.accessibilityPerformShowMenu when Avalonia.Automation.Provider.IExpandCollapseProvider.ShowsMenu is true.

GetAutomationControlTypeCore()

Gets the control type for the element that is associated with the UI Automation peer.

protected override AutomationControlType GetAutomationControlTypeCore()

Returns

AutomationControlType

Remarks

Gets the type of the element.

WindowsUIA_ControlTypePropertyId
macOSNSAccessibilityProtocol.accessibilityRole

GetClassNameCore()

Gets a string that describes the class of the element.

protected override string GetClassNameCore()

Returns

string

Remarks

A string containing the class name for the automation element as assigned by the control developer. This is often the C# class name of the control.

WindowsUIA_ClassNamePropertyId
macOSNo mapping.

GetLocalizedControlTypeCore()

Gets a human-readable localized string that represents the type of the control that is associated with this automation peer.

protected override string GetLocalizedControlTypeCore()

Returns

string

Remarks

WindowsUIA_LocalizedControlTypePropertyId (not yet implemented)
macOSNo mapping.

GetProviderCore(Type)

Tries to get a provider of the specified type from the peer.

protected override object? GetProviderCore(Type providerType)
Parameter Type Description
providerType Type

Returns

object:

The provider, or null if not implemented on this peer.

Toggle()

Cycles through the toggle states of a control.

public void Toggle()

Remarks

WindowsIToggleProvider.Toggle
macOSNSAccessibilityProtocol.accessibilityPerformPress

Inherited Members

  • ControlAutomationPeer.GetOrCreate(Control)
  • ControlAutomationPeer.CreatePeerForElement(Control)
  • ControlAutomationPeer.FromElement(Control)
  • ControlAutomationPeer.BringIntoViewCore()
  • ControlAutomationPeer.GetOrCreateChildrenCore()
  • ControlAutomationPeer.GetChildrenCore()
  • ControlAutomationPeer.GetLabeledByCore()
  • ControlAutomationPeer.GetNameCore()
  • ControlAutomationPeer.GetHelpTextCore()
  • ControlAutomationPeer.GetParentCore()
  • ControlAutomationPeer.GetVisualRootCore()
  • ControlAutomationPeer.InvalidateChildren()
  • ControlAutomationPeer.InvalidateParent()
  • ControlAutomationPeer.ShowContextMenuCore()
  • ControlAutomationPeer.TrySetParent(AutomationPeer)
  • ControlAutomationPeer.GetAcceleratorKeyCore()
  • ControlAutomationPeer.GetAccessKeyCore()
  • ControlAutomationPeer.GetAutomationIdCore()
  • ControlAutomationPeer.GetBoundingRectangleCore()
  • ControlAutomationPeer.HasKeyboardFocusCore()
  • ControlAutomationPeer.IsContentElementCore()
  • ControlAutomationPeer.IsControlElementCore()
  • ControlAutomationPeer.IsEnabledCore()
  • ControlAutomationPeer.IsKeyboardFocusableCore()
  • ControlAutomationPeer.SetFocusCore()
  • ControlAutomationPeer.GetControlTypeOverrideCore()
  • ControlAutomationPeer.IsContentElementOverrideCore()
  • ControlAutomationPeer.IsControlElementOverrideCore()
  • ControlAutomationPeer.IsOffscreenCore()
  • ControlAutomationPeer.Owner
  • AutomationPeer.BringIntoView()
  • AutomationPeer.GetAcceleratorKey()
  • AutomationPeer.GetAccessKey()
  • AutomationPeer.GetAutomationControlType()
  • AutomationPeer.GetAutomationId()
  • AutomationPeer.GetBoundingRectangle()
  • AutomationPeer.GetChildren()
  • AutomationPeer.GetClassName()
  • AutomationPeer.GetLabeledBy()
  • AutomationPeer.GetLocalizedControlType()
  • AutomationPeer.GetName()
  • AutomationPeer.GetHelpText()
  • AutomationPeer.GetParent()
  • AutomationPeer.GetVisualRoot()
  • AutomationPeer.HasKeyboardFocus()
  • AutomationPeer.IsContentElement()
  • AutomationPeer.IsControlElement()
  • AutomationPeer.IsEnabled()
  • AutomationPeer.IsKeyboardFocusable()
  • AutomationPeer.IsOffscreen()
  • AutomationPeer.SetFocus()
  • AutomationPeer.ShowContextMenu()
  • AutomationPeer.GetProvider<T>()
  • AutomationPeer.RaiseChildrenChangedEvent()
  • AutomationPeer.RaisePropertyChangedEvent(AutomationProperty, object, object)
  • AutomationPeer.EnsureEnabled()
  • AutomationPeer.ChildrenChanged
  • AutomationPeer.PropertyChanged
  • object.GetType()
  • object.MemberwiseClone()
  • object.ToString()
  • object.Equals(object)
  • object.Equals(object, object)
  • object.ReferenceEquals(object, object)
  • object.GetHashCode()

Extension Methods