welcome to Qijie's Blog 薛其杰

随笔分类 -  windows store Apps

Using Dispatcher
摘要:he following code example shows how you might attempt to update the UI from your task logic. // The Wrong Way to Update a UI Objectpublic void btnGetT 阅读全文
posted @ 2017-08-15 16:22 零点零一 阅读(142) 评论(0) 推荐(0)
WPF的Binding学习笔记(二)
摘要:原文: http://www.cnblogs.com/pasoraku/archive/2012/10/25/2738428.htmlWPF的Binding学习笔记(二)上次学了点点Binding的皮毛, 然后就做别的事去了, 等回头再来看WPF的时候, 哈忘记了~于是写个例子补一下, 在继续学习B... 阅读全文
posted @ 2015-12-06 11:31 零点零一 阅读(213) 评论(0) 推荐(0)
WPF的Binding学习笔记(一)
摘要:原文: http://www.cnblogs.com/pasoraku/archive/2012/10/20/2732427.html一、binding的一般步骤 1,准备数据源 数据源需要实现INotifyPropertyChanged接口 例如:class Person : INotifyP... 阅读全文
posted @ 2015-12-06 11:28 零点零一 阅读(803) 评论(0) 推荐(0)
Azure: Destruct sample code for Mobile Service
只有注册用户登录后才能阅读该文。
posted @ 2015-03-18 16:21 零点零一 阅读(5) 评论(0) 推荐(0)
转载:CancellationToken
摘要:http://www.cnblogs.com/Abbey/archive/2011/09/12/2174208.html最近在学习.NET中的线程同步。其中一个重要的技术叫线程的取消(中止),涉及的主要是一个叫CancellationToken的东西。通过学习,可以简单总结为:Token是一个令牌。... 阅读全文
posted @ 2015-01-15 14:09 零点零一 阅读(263) 评论(0) 推荐(0)
VirtualizingStackPanel
摘要:... 阅读全文
posted @ 2015-01-15 14:08 零点零一 阅读(2789) 评论(0) 推荐(0)
Windows Store App, Shaken
摘要:Accelerometer _accelerometer; int _shakeCount = 0; public MainPage() { this.InitializeComponent(); _accelerometer=Accelerometer.GetDefault(); if (_accelerometer != null) _accelerometer.Shaken += new TypedEventHandler(Shaken... 阅读全文
posted @ 2013-09-24 16:22 零点零一 阅读(202) 评论(0) 推荐(0)
Disable Portrait in app
摘要:I had this problem as well as I wanted to constrain my game to only landscape mode. I put this in my OnLaunched handler for App.xaml:Windows.Graphics.Display.DisplayProperties.AutoRotationPreferences=Windows.Graphics.Display.DisplayOrientations.Landscape;However I noted that in the simulator it seem 阅读全文
posted @ 2013-09-24 16:04 零点零一 阅读(266) 评论(0) 推荐(0)
GridView of different size items
摘要:http://blogs.u2u.be/diederik/post/2012/03/07/Databinding-to-the-VariableSizedWrapGrid-in-Windows-8-Metro.aspx 阅读全文
posted @ 2013-08-15 15:10 零点零一 阅读(162) 评论(0) 推荐(0)
嵌入广告
该文被密码保护。
posted @ 2013-01-18 16:56 零点零一 阅读(0) 评论(0) 推荐(0)
Settings Pane in Charm
摘要:using Windows.UI.ApplicationSettings; Rect _windowBounds; double _settingsWidth = 364; Popup _settingsPopup; public MainPage() { this.InitializeComponent(); Windows.UI.ApplicationSettings.SettingsPane.GetForCurrentView().CommandsRequ... 阅读全文
posted @ 2013-01-16 17:09 零点零一 阅读(337) 评论(0) 推荐(0)
GridView on Selection Changed
摘要:GridView中有两个事件分别是:gvSource_SelectionChanged 和gvSource_ItemClick。1. 若你设置了IsItemClickEnabled="True", 当你单击GridView里边的一个item时, gvSource_ItemClick事件会被触发。此时鼠标左键单击只是单击而不是选择。2. 相反你如此设置IsItemClickEnabled="False", 当你单击GridView里边的一个item时, 此时鼠标左键是选择, 所以gvSource_SelectionChanged会被执行而gvSource_ 阅读全文
posted @ 2013-01-13 20:30 零点零一 阅读(1651) 评论(0) 推荐(1)
Animation in Windows 8 apps
摘要:在Windows 8 App里边的动画和在silverlight里边还有稍微的区别, 如代码:using Windows.UI.Xaml;using Windows.UI.Xaml.Media;using Windows.UI.Xaml.Media.Animation;using Windows.UI.Xaml.Controls; protected void DemoAnimation() { Duration m_Dur = new Duration(TimeSpan.FromSeconds(4)); Storyboa... 阅读全文
posted @ 2013-01-11 15:52 零点零一 阅读(328) 评论(0) 推荐(0)
关于Windows Store App中的Globalization
摘要:前言: Gloablization, 全球化,本地化首先要在项目中创建strings 文件夹,然后在strings下边创建每一种语言代码的文件夹, 如en-us代表英语, zh-cn代表中文。其次向每一个文件夹下添加Resources.resw文件。在每一种语言的Resources.resw中添加要本地化的控件的名称和相关语言中的翻译。编写代码, 首先获取想要的语言, 根据语言来决定为PrimaryLanguageOverride赋值。 string language = string.Empty; string region = Windows.S... 阅读全文
posted @ 2012-12-24 17:01 零点零一 阅读(944) 评论(0) 推荐(0)
Windows Store App窗口大小改动的事件
摘要:前言: Windows Store App, ApplicationViewState前几天一直纠结的一件事情就是我如何能够自己编程控制控件在不同ViewState中的设置, 搜寻网络发现这个触发器是Window.Current.SizeChanged。ApplicationViewState是一个枚举值, 有如下4个值:Windows.UI.ViewManagement.ApplicationViewState.FullScreenPortraitWindows.UI.ViewManagement.ApplicationViewState.SnappedWindows.UI.ViewMana 阅读全文
posted @ 2012-12-23 18:16 零点零一 阅读(541) 评论(0) 推荐(0)
动态更新App Button的Style
摘要:在Windows 8 App中, App Button 的Style都是存储在资源文件中的, 系统自带的资源文件在Common folder下的StandardStyle.Xaml . 里边定义的Style是以健(Key)的形式表示和定义的。当我们在程序中动态改变一个App Button的Style是, 可以这么写: btPicture.Style = (Style)Application.Current.Resources["PicturesAppBarButtonStyle"];还有, 当你自定义一个Style时, 它所BasedOn的Style一定要写在其定义行之前. 阅读全文
posted @ 2012-12-20 17:14 零点零一 阅读(648) 评论(0) 推荐(0)
App button alignment in BottomAppBar
摘要:Expected BottomeAppBar Style:For a long time, I have problem with the button alignment in bottomAppBar. If we have more than one buttons, I knew we need to add them to a stackpanel, and there only could be one stackpanel be added directly under <AppBar></AppBar>. Therefore if I want to l 阅读全文
posted @ 2012-12-20 17:06 零点零一 阅读(237) 评论(0) 推荐(0)
Win 8 app 获取窗口的宽度和高度, 本地化, 及文本读取
摘要:在Windows 8的程序中:1. 获取用户窗口的宽高; double height = Windows.UI.Xaml.Window.Current.Bounds.Height; double width = Window.Current.Bounds.Width;2. 获取用户的语言设置; this._cultureInfo = System.Globalization.CultureInfo .CurrentUICulture .Name .ToString ();注释: 我现在还不清楚这个CurrentUICulture是怎么... 阅读全文
posted @ 2012-12-15 21:55 零点零一 阅读(633) 评论(0) 推荐(0)
GridView.ScrollIntoView() doesn't work
摘要:I am writing an application which contains two pages, GroupedItemsPage and ItemDetailPage. I let lots of pictures present in the GroupItemsPage, then after select a specified picture in this page, it will nevigate the the second page withe the details showing for the selected picture. Since I put to 阅读全文
posted @ 2012-12-15 10:11 零点零一 阅读(809) 评论(0) 推荐(0)