M4: 使用CommandBar
本小节将介绍如何使用CommandBar, CommandBar分为PrimaryCommands和SecondaryCommands,在PrimaryCommands中不要放置多于四个按钮。然后将不常使用的命令放到SecondaryCommands中。
在MainPage.xaml页面, 添加Page.BottomAppBar, 在CommandBar中新添加四个AppBarButton。在CommandBar.SecondaryCommands中添加一个Menu Item。
打开Card程序, 在MainPage.xaml页面, 在</Page>之前,新添加Page.BottomAppBar控件。 在Page.BottomAppBar控件中, 新添加CommandBar控件, 修改后代码如下:
<Page.BottomAppBar>
<CommandBar>
</CommandBar>
</Page.BottomAppBar>
</Page>
在CommandBar中加入第一个AppBarButton Control, 命名为abtnGetWishes, 设置其Icon属性,Label属性。
<AppBarButton x:Name="abtnGetWishes" Icon="Play" Label="Wishes" />
同样加入其它三个AppBarButton Control, 并设置相应属性。
<AppBarButton x:Name="abtnGetWishes" Icon="Play" Label="Wishes" />
<AppBarButton x:Name="abtnSendFriend" Icon="Send" Label="Wishes" />
<AppBarButton x:Name="abtnOpenFile" Icon="Pictures" Label="Wishes" />
<AppBarButton x:Name="abtnOpenCamera" Icon="Camera" Label="Wishes" />
加入二级菜单项目。
<CommandBar.SecondaryCommands>
<AppBarButton x:Name="abtnLike" Icon="Like" Label="Like" />
</CommandBar.SecondaryCommands>
在第二和第三个AppBarButton之间加入AppBarSeparator,将命令分组。
<AppBarSeparator />
然后,定义abtnGetWishes的单击事件为GetMessage_Click, 定义abtnSendFriend的单击事件为SendMail_Click。
修改后代码如下:
<Page.BottomAppBar>
<CommandBar>
<AppBarButton x:Name="abtnGetWishes" Icon="Play" Label="Wishes" Click="GetMessage_Click"/>
<AppBarButton x:Name="abtnSendFriend" Icon="Send" Label="Send" Click="SendMail_Click"/>
<AppBarSeparator />
<AppBarButton x:Name="abtnOpenFile" Icon="Pictures" Label="Open" />
<AppBarButton x:Name="abtnOpenCamera" Icon="Camera" Label="Camera" />
<CommandBar.SecondaryCommands>
<AppBarButton x:Name="abtnLike" Icon="Like" Label="Like" />
</CommandBar.SecondaryCommands>
</CommandBar>
</Page.BottomAppBar>
运行程序, 查看新添加CommandBar效果。

M4: 使用CommandBar的更多相关文章
- PHP扩展-如何使用文件config.m4
config.m4文件用于指定正在开发的扩展在类unix系统下构建时支持的选项,指定此扩展需要哪些库以及哪些源文件:使用 GNU autoconf 语法编写.注意需要重新执行phpize,config ...
- 关于 m4 文本处理引擎
使用 m4 开源项目还是挺多的,之前看到都有的怕怕的,选择自动略过.今天鼓起勇气来学习一波. 首先 m4 processor 是一个“宏定义”处理器,也就是说,他是一个纯粹的文本处理器,干些管理模板, ...
- 安装openssl 扩展的时候出现Cannot find config.m4. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module的解决方法
进入php源码包目录:cd /usr/local/php-5.6.25/ext/openssl 执行命令: cp ./config0.m4 ./config.m4 即可
- phpize建立php扩展 Cannot find config.m4
centos php 安装 memcache 扩展的时候 爆 Cannot find config.m4 错误 解决方案参考以下文章 参考文章 http://blog.csdn.net/wgl ...
- 手动安装m4, autoconf, automake, libtool
转自http://ruby-china.org/topics/2434 系列文章原载于自己的博客,TOPI.CO (http://topi.co) ,某天不小心就push错啦,懒得从头再来,上传到Ru ...
- Windows 8.1 新增控件之 CommandBar
上一篇为大家介绍了AppBar 的相关内容,本篇继续介绍CommandBar 的使用方法.与AppBar 相比而言,CommandBar 在开发使用方面较为单一,在按键布局上分为主控区(Primary ...
- GNU M4 - GNU Project - 免费软件基金会(FSF)
-------------------------------------------------------------------------------------- GNU M4介绍: GNU ...
- IBM X3650 M4服务器安装centos找不到硬盘的解决方法
IBM X3650 M4是IBM新的2U的服务器,IBM服务器以高稳定性和卓越的性能一直领先其他的服务器品牌成为全球第一.但是我们在用IBM的最新版9.4引导盘引导的时候,里面选项只有windows ...
- 重新想象 Windows 8.1 Store Apps (72) - 新增控件: AppBar, CommandBar
[源码下载] 重新想象 Windows 8.1 Store Apps (72) - 新增控件: AppBar, CommandBar 作者:webabcd 介绍重新想象 Windows 8.1 Sto ...
随机推荐
- [问题2014A05] 复旦高等代数 I(14级)每周一题(第七教学周)
[问题2014A05] (1) 设 \(x_1,x_2\cdots,x_n,x\) 都是未定元, \(s_k=x_1^k+x_2^k+\cdots+x_n^k\,(k\geq 1)\), \(s_0 ...
- 从零开始学iPhone开发(3)——视图及控制器的使用
上一节我们分别使用IB和代码建立了两个视图并且熟悉了一些控件.这一节我们需要了解视图和视图的切换. 在iOS编程中,框架提供了很多视图,比如UIView,UIImageView, UIWebView等 ...
- uploadify springMVC
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...
- 用Git导出项目
Git没有SVN的导出功能,不能像 svn export url 那样,将某个版本的代码导出为不带版本控制文件的文件夹. Git提供了archive命令,可以把版本的文件流导出. 可以将Git ...
- 16.Linux配置环境变量和日志history和Terminal颜色和用户(IP)操作日志记录
$ vim /etc/profile #####################环境变量################################# export TZ='Asia/Shangh ...
- grunt压缩合并代码
module.exports = function(grunt) { // 配置 grunt.initConfig({ pkg : grunt.file.readJSON('package.json' ...
- 【Todo】网络编程学习-面向工资编程
https://zhuanlan.zhihu.com/p/20204159 这个系列真的非常好,好好领会学习一下
- selenium 安装与 chromedriver安装
直接使用pip安装 pip slenium 用 Chrome 浏览器来测试 from selenium import webdriver browser = webdriver.Chrome() ...
- 个人对beta发布的观点
内容:五个小组的beta发布 时间:2016年11月10日 13:40-15:15 地点:传媒西楼202 发布顺序: 1.飞天小女警(选礼物) 2.金州勇士(在线考试) 3.新蜂(俄罗斯方块) 4.天 ...
- Aptana Studio 2启动时提示 Workspace Cannot Be Created 解决办法
今天在安装Aptana Studio 2时出现这个东东,卸载后再安装依旧不行最后找到原因 原因 : 就是由于你把“我的文档”的位置修改造成的. 但Aptana还以为 “我的文档”的位置 是在系统的默认 ...