Class CommandBar
Defines a
Implements
Inherited Members
Namespace: Legerity.Windows.Elements.Core
Assembly: Legerity.Windows.dll
Syntax
public class CommandBar : WindowsElementWrapper, IElementWrapper<WindowsElement>
Constructors
| Improve this Doc View SourceCommandBar(WindowsElement)
Initializes a new instance of the CommandBar class.
Declaration
public CommandBar(WindowsElement element)
Parameters
Type | Name | Description |
---|---|---|
WindowsElement | element | The |
Properties
| Improve this Doc View SourcePrimaryButtons
Gets the collection of primary buttons.
Declaration
public virtual IEnumerable<AppBarButton> PrimaryButtons { get; }
Property Value
Type | Description |
---|---|
IEnumerable<AppBarButton> |
SecondaryButtons
Gets the collection of secondary buttons.
Note, this property will only return a result when the secondary buttons are shown in the flyout.
Declaration
public virtual IEnumerable<AppBarButton> SecondaryButtons { get; }
Property Value
Type | Description |
---|---|
IEnumerable<AppBarButton> |
SecondaryMenuButton
Gets the AppBarButton for opening the secondary button menu.
Declaration
public virtual AppBarButton SecondaryMenuButton { get; }
Property Value
Type | Description |
---|---|
AppBarButton |
Methods
| Improve this Doc View SourceClickPrimaryButton(String)
Clicks a primary button in the command bar with the specified button name or Automation ID.
Declaration
public virtual void ClickPrimaryButton(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the button to click. |
ClickPrimaryButtonByPartialName(String)
Clicks a primary button in the command bar with the specified partial button name or Automation ID.
Declaration
public virtual void ClickPrimaryButtonByPartialName(string partialName)
Parameters
Type | Name | Description |
---|---|---|
System.String | partialName | The partial name of the button to click. |
ClickSecondaryButton(String)
Clicks a secondary button in the command bar with the specified button name.
Declaration
public virtual void ClickSecondaryButton(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the button to click. |
Exceptions
Type | Condition |
---|---|
ElementNotShownException | Thrown when the more button is not shown. |
ClickSecondaryButtonByPartialName(String)
Clicks a secondary button in the command bar with the specified partial button name.
Declaration
public virtual void ClickSecondaryButtonByPartialName(string partialName)
Parameters
Type | Name | Description |
---|---|---|
System.String | partialName | The partial name of the button to click. |
Exceptions
Type | Condition |
---|---|
ElementNotShownException | Thrown when the more button is not shown. |
OpenSecondaryButtonMenu()
Opens the menu associated with the secondary button options.
Declaration
public virtual void OpenSecondaryButtonMenu()
Exceptions
Type | Condition |
---|---|
ElementNotShownException | Thrown when the more button is not shown. |
Operators
| Improve this Doc View SourceImplicit(AppiumWebElement to CommandBar)
Allows conversion of a
Declaration
public static implicit operator CommandBar(AppiumWebElement element)
Parameters
Type | Name | Description |
---|---|---|
AppiumWebElement | element | The |
Returns
Type | Description |
---|---|
CommandBar | The CommandBar. |
Implicit(RemoteWebElement to CommandBar)
Allows conversion of a
Declaration
public static implicit operator CommandBar(RemoteWebElement element)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The |
Returns
Type | Description |
---|---|
CommandBar | The CommandBar. |
Implicit(WindowsElement to CommandBar)
Allows conversion of a
Declaration
public static implicit operator CommandBar(WindowsElement element)
Parameters
Type | Name | Description |
---|---|---|
WindowsElement | element | The |
Returns
Type | Description |
---|---|
CommandBar | The CommandBar. |