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.

  • 相关阅读:
    2015百度之星 放盘子
    2015百度之星 IP聚合
    2015百度之星 列变位法解密
    2015百度之星 大搬家
    数论 --- 费马小定理 + 快速幂 HDU 4704 Sum
    组合数(Lucas定理) + 快速幂 --- HDU 5226 Tom and matrix
    Linux
    概率论 --- Uva 11181 Probability|Given
    JAVA
    网络爬虫-原理篇(二)
  • 原文地址:https://www.cnblogs.com/Blackeye286/p/2853213.html
Copyright © 2011-2022 走看看