UWP tips (与wp8.1的不同)
2015-10-07 17:28
239 查看
一、异步调用之后,要更新UI时,代码如下
二、原来的ApplicationBar更改为CommandBar
三、原来在wp8.1中状态栏StatusBar类在UWP中也发生了改变
现在要控制UWP状态栏(显示信号、时间),可以用以下的方法
1.在项目中选择 添加引用
2.选择 Universal Windows , Extensions
3.将Windows Mobile Extensions for the UWP添加进项目中
代码:
四、PC/Mobile的UWP开发中如果要用到WebView,可以先用windows 10的edge浏览器调试。在edge浏览器中调出F12开发人员工具,选择“仿真”,模式中有桌面和windows10移动版选择。
五、Segoe MDL2图标指南,地址:https://msdn.microsoft.com/zh-cn/library/windows/apps/xaml/jj841126.aspx
Segoe MDL2图标样式与对应代码可以用cortana搜索“字符映射表”
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { test.Text = "abc"; });
二、原来的ApplicationBar更改为CommandBar
<AppBarButton Label="评价" Click="appbarRank_Click"> <AppBarButton.Icon> <BitmapIcon UriSource="Images/Tools/pingjia.png" /> </AppBarButton.Icon> </AppBarButton> <CommandBar.SecondaryCommands> <AppBarButton Icon="Like" Label="Like" IsCompact="True"/> <AppBarButton Icon="Dislike" Label="Dislike" /> </CommandBar.SecondaryCommands>
三、原来在wp8.1中状态栏StatusBar类在UWP中也发生了改变
现在要控制UWP状态栏(显示信号、时间),可以用以下的方法
1.在项目中选择 添加引用
2.选择 Universal Windows , Extensions
3.将Windows Mobile Extensions for the UWP添加进项目中
代码:
if(Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) { StatusBar statusBar = StatusBar.GetForCurrentView(); statusBar.ForegroundColor = Colors.White;//设置状态栏信号、时间等图标的颜色 await statusBar.HideAsync();//隐藏状态栏 }
四、PC/Mobile的UWP开发中如果要用到WebView,可以先用windows 10的edge浏览器调试。在edge浏览器中调出F12开发人员工具,选择“仿真”,模式中有桌面和windows10移动版选择。
五、Segoe MDL2图标指南,地址:https://msdn.microsoft.com/zh-cn/library/windows/apps/xaml/jj841126.aspx
Segoe MDL2图标样式与对应代码可以用cortana搜索“字符映射表”
相关文章推荐
- LeetCode OJ:Add Digits(数字相加)
- ocp-177
- ocp-176
- hibernate中使用schemaExport生成数据表报错解决方法
- ocp-175
- ocp-174
- tabview
- 通过读取淘宝API的优化 来考虑高并发网站的架构讨论
- 【译】29个你必须知道的Linux命令
- ocp-173
- iOS开发系列课程(08) --- 事件处理详解和手势操作
- 7款jQuery图片轮播滑动插件
- 要件审判九步法及其基本价值 z
- C++实现KMP算法(单值返回版)
- 面试题29:数组中出现次数超过一半的数字
- 配置jdk比较简单的方法
- ocp-172
- 【C语言】1到100中9的个数
- ocp-171
- 资讯:Backlight业界信息