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.

  • 相关阅读:
    数据库外连接和内连接详解
    关于省市联动问题的分析
    邮箱验证修改密码,通过邮箱找回密码
    格式化Json传递的日期
    项目中验证码的使用
    水仙花数
    回文数
    冒泡排序
    《终结者·洛谷小说》总集
    题解 CF151A 【Soft Drinking】
  • 原文地址:https://www.cnblogs.com/Blackeye286/p/2853213.html
Copyright © 2011-2022 走看看