App​Bar​Automation​Peer App​Bar​Automation​Peer App​Bar​Automation​Peer Class

Definition

Exposes AppBar types to Microsoft UI Automation.

public : class AppBarAutomationPeer : FrameworkElementAutomationPeer, IAppBarAutomationPeer, IExpandCollapseProvider, IToggleProvider, IWindowProviderpublic class AppBarAutomationPeer : FrameworkElementAutomationPeer, IAppBarAutomationPeer, IExpandCollapseProvider, IToggleProvider, IWindowProviderPublic Class AppBarAutomationPeer Inherits FrameworkElementAutomationPeer Implements IAppBarAutomationPeer, IExpandCollapseProvider, IToggleProvider, IWindowProvider
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties

Remarks

The Windows Runtime AppBar class creates a new AppBarAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from AppBarAutomationPeer if you are deriving a custom class from AppBar and want to add automation support for additional features that you enabled in your custom class. Then override OnCreateAutomationPeer so that it returns your custom peer.

Default peer implementation and overrides in AppBarAutomationPeer

AppBarAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.

Note

Windows 8: returns AutomationControlType.Custom

Constructors

AppBarAutomationPeer(AppBar) AppBarAutomationPeer(AppBar) AppBarAutomationPeer(AppBar)

Initializes a new instance of the AppBarAutomationPeer class.

public : AppBarAutomationPeer(AppBar owner)public AppBarAutomationPeer(AppBar owner)Public Sub New(owner As AppBar)
Parameters
owner
AppBar AppBar AppBar

The AppBar control instance to create the peer for.

Attributes

Properties

ExpandCollapseState ExpandCollapseState ExpandCollapseState

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

public : ExpandCollapseState ExpandCollapseState { get; }public ExpandCollapseState ExpandCollapseState { get; }Public ReadOnly Property ExpandCollapseState As ExpandCollapseState
Value
ExpandCollapseState ExpandCollapseState ExpandCollapseState

A value of the enumeration.

Attributes

InteractionState InteractionState InteractionState

Gets the interaction state of the app bar, such as running, closing, and so on.

public : WindowInteractionState InteractionState { get; }public WindowInteractionState InteractionState { get; }Public ReadOnly Property InteractionState As WindowInteractionState
Value
WindowInteractionState WindowInteractionState WindowInteractionState

The interaction state of the app bar.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

IsModal IsModal IsModal

Gets a Boolean value indicating if the app bar is modal.

public : PlatForm::Boolean IsModal { get; }public bool IsModal { get; }Public ReadOnly Property IsModal As bool
Value
PlatForm::Boolean bool bool

true if the app bar is modal; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

IsTopmost IsTopmost IsTopmost

Gets a Boolean value indicating if the app bar is the topmost element in the z-order of layout.

public : PlatForm::Boolean IsTopmost { get; }public bool IsTopmost { get; }Public ReadOnly Property IsTopmost As bool
Value
PlatForm::Boolean bool bool

true if the app bar is topmost; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Maximizable Maximizable Maximizable

Gets a Boolean value that indicates whether the app bar can be maximized.

public : PlatForm::Boolean Maximizable { get; }public bool Maximizable { get; }Public ReadOnly Property Maximizable As bool
Value
PlatForm::Boolean bool bool

true if the app bar can be maximized; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Minimizable Minimizable Minimizable

Gets a Boolean value that indicates whether the app bar can be minimized.

public : PlatForm::Boolean Minimizable { get; }public bool Minimizable { get; }Public ReadOnly Property Minimizable As bool
Value
PlatForm::Boolean bool bool

true if the app bar can be minimized; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

ToggleState ToggleState ToggleState

Retrieves the toggle state of the owner AppBar.

public : ToggleState ToggleState { get; }public ToggleState ToggleState { get; }Public ReadOnly Property ToggleState As ToggleState
Value
ToggleState ToggleState ToggleState

The ToggleState of the owner control.

Attributes

Remarks

An automation element must cycle through its toggle state in this order: On, Off and, if supported, Indeterminate.

VisualState VisualState VisualState

Gets the visual state of the app bar.

public : WindowVisualState VisualState { get; }public WindowVisualState VisualState { get; }Public ReadOnly Property VisualState As WindowVisualState
Value
WindowVisualState WindowVisualState WindowVisualState

The visual state of the app bar, as a value of the enumeration.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Methods

Close() Close() Close()

Closes the app bar.

public : void Close()public void Close()Public Function Close() As void
Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Collapse() Collapse() Collapse()

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

public : void Collapse()public void Collapse()Public Function Collapse() As void
Attributes

Expand() Expand() Expand()

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

public : void Expand()public void Expand()Public Function Expand() As void
Attributes

SetVisualState(WindowVisualState) SetVisualState(WindowVisualState) SetVisualState(WindowVisualState)

Changes the visual state of the app bar (such as minimizing or maximizing it).

public : void SetVisualState(WindowVisualState state)public void SetVisualState(WindowVisualState state)Public Function SetVisualState(state As WindowVisualState) As void
Parameters
state
WindowVisualState WindowVisualState WindowVisualState

The visual state of the app bar to change to, as a value of the enumeration.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Toggle() Toggle() Toggle()

Cycles through the toggle states of an AppBarAutomationPeer.

public : void Toggle()public void Toggle()Public Function Toggle() As void
Attributes

WaitForInputIdle(Int32) WaitForInputIdle(Int32) WaitForInputIdle(Int32)

Blocks the calling code for the specified time or until the associated process enters an idle state, whichever completes first.

public : PlatForm::Boolean WaitForInputIdle(int milliseconds)public bool WaitForInputIdle(Int32 milliseconds)Public Function WaitForInputIdle(milliseconds As Int32) As bool
Parameters
milliseconds
int Int32 Int32

The amount of time, in milliseconds, to wait for the associated process to become idle.

Returns
PlatForm::Boolean bool bool

true if the app bar has entered the idle state; false if the timeout occurred.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

See Also