IsOpen property

AppBar.IsOpen property

Gets or sets a value that indicates whether the AppBar is open.

Syntax


Public Property IsOpen As Boolean


<AppBar IsOpen="bool"/>

Property value

Type: System.Boolean [.NET] | Platform::Boolean [C++]

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

Remarks

How the app bar is displayed when it's open depends on the ClosedDisplayMode property setting. For more info, see App bar and command bar.

You can open and close the app bar programmatically by setting the IsOpen property. You can use the Opening, Opened, Closing, and Closed events to respond to the app bar being opened or closed.

Notes for previous versions

Windows 8:  Binding to the IsOpen property doesn't have the expected results because the PropertyChanged notification doesn't occur when the property is set.

Examples


<AppBar IsOpen="True">
    <Grid>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Style="{StaticResource PreviousAppBarButtonStyle}" 
                    Click="Button_Click"/>
            <Button Style="{StaticResource NextAppBarButtonStyle}" 
                    Click="Button_Click"/>
        </StackPanel>
    </Grid>
</AppBar>


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

AppBar
Quickstart: Adding app bars

 

 

Show:
© 2016 Microsoft