zoukankan      html  css  js  c++  java
  • How to add AppBar

    How to add custom AppBar

    Like Other contols, AppBar is also under nmaespace of "Windows.UI.Xaml.Controls", and it just a simple ContentControl.

    The member of AppBar is also very simple, IsOpen and IsStick represents whether open or not and whether  not hide automatical. And we can use events Opened and Closed to reopresents open and hide them. 

    Now we can through Page.TopAppBar and BottomAppBar to set top and bottom appbar for Metro Application. Following are small code snippet creates a samll demo:

    <Page.BottomAppBar>
            <AppBar IsOpen = "True" IsSticky = "True" x:Name="bottomAppBar" Closed="Closedevent" Padding="10,0,10,0">
                <Grid>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                        <Button Style="{StaticResource AddAppBarButtonStyle}" Click="AddButton_Click"/>
                        <Button Style="{StaticResource EditAppBarButtonStyle}" Click="EditButton_Click" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                        <Button Style="{StaticResource HelpAppBarButtonStyle}" Click="HelpButton_Click" />
                    </StackPanel>
                </Grid>
            </AppBar>
        </Page.BottomAppBar>
    

     And Please attention: no matter when you set the value of IsStrick is True,When you right click on Metro App, AppBar is disappeared.

  • 相关阅读:
    闭包的应用(转载)
    智能社讲解js基础
    HTML5 Geolocation
    Redis主从配置
    Redis序列化配置
    Ribbon负载均衡原理学习记录
    2059 mysql
    Cache缓存
    rabbitmq(三)-Direct交换器
    rabbitmq(二)原理
  • 原文地址:https://www.cnblogs.com/Blackeye286/p/2853213.html
Copyright © 2011-2022 走看看