CommandBarFlyout Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a specialized flyout that provides layout for AppBarButton, AppBarToggleButton, and AppBarSeparator controls.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
/// [Microsoft.UI.Xaml.MUXContractProperty(version=7)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="PrimaryCommands")]
class CommandBarFlyout : FlyoutBase
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="PrimaryCommands")]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=7)]
class CommandBarFlyout : FlyoutBase
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.UI.Xaml.Markup.ContentProperty(Name="PrimaryCommands")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class CommandBarFlyout : FlyoutBase
[Microsoft.UI.Xaml.MUXContractProperty(version=7)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="PrimaryCommands")]
public class CommandBarFlyout : FlyoutBase
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="PrimaryCommands")]
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=7)]
public class CommandBarFlyout : FlyoutBase
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.UI.Xaml.Markup.ContentProperty(Name="PrimaryCommands")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public class CommandBarFlyout : FlyoutBase
Public Class CommandBarFlyout
Inherits FlyoutBase
<CommandBarFlyout .../>
-or-
<CommandBarFlyout>
commandBarElements
</CommandBarFlyout>
- Inheritance
-
CommandBarFlyout
- Derived
- Attributes
-
Microsoft.UI.Xaml.MUXContractPropertyAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute ContentPropertyAttribute Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute ContractVersionAttribute
Examples
Tip
For more info, design guidance, and code examples, see Command bar flyout.
The WinUI 2 Gallery app includes interactive examples of most WinUI 2 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.
Remarks
You can add other controls to a CommandBarFlyout by wrapping them in an AppBarElementContainer. This includes controls such as DropDownButton or SplitButton, or containers like StackPanel for more complex UI.
Constructors
CommandBarFlyout() |
Initializes a new instance of the CommandBarFlyout class. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
Properties
AlwaysExpanded |
Gets or sets a value that indicates whether or not the CommandBarFlyout should always stay in its Expanded state and block the user from entering the Collapsed state. Defaults to false. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
PrimaryCommands |
Gets the collection of primary command elements for the CommandBarFlyout. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SecondaryCommands |
Gets the collection of secondary command elements for the CommandBarFlyout. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |