随笔分类 -  win8 metro style 学习过程

关于page 的NavigationCacheMode
摘要:NavigationCacheMode 默认是disabled的如果我们给NavigationCacheMode 为disabled,同时在page 的protected override void OnNavigatedFrom(NavigationEventArgs e) { Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; Windows.Storage.ApplicationDataContainer bitimg 阅读全文

posted @ 2012-09-24 10:22 GIS-MAN 阅读(1992) 评论(0) 推荐(0)

打开一个网页 metro app
摘要:await Windows.System.Launcher.LaunchUriAsync(new Uri(((HyperlinkButton)sender).Tag.ToString())); 阅读全文

posted @ 2012-09-20 11:30 GIS-MAN 阅读(219) 评论(0) 推荐(0)

关于主题动画.主题过度
摘要:http://www.cnblogs.com/trigged/archive/2012/03/31/2427508.html http://msdn.microsoft.com/zh-cn/library/windows/apps/xaml/br243232.aspx 给gridview 里面的每个子项 添加 从右边进入的动画 <GridView.ItemTemplate> <DataTempl... 阅读全文

posted @ 2012-09-20 10:42 GIS-MAN 阅读(222) 评论(0) 推荐(0)

metro app 进行缓存,
摘要:一些页面每次请求服务端的数据都是一样的,这样就可以请求一次,然后把数据缓存起来 在OnNavigatedFrom 添加如下的语句 由于不能对一个集合对象进行缓存,下面介绍如何缓存一个几个集合对象,以 ObservableCollection<Advertisement>,为例 要想缓存这个集合, 需要对Advertisement,每个属性 创建一个 Windows.Storage.Applica... 阅读全文

posted @ 2012-09-20 09:36 GIS-MAN 阅读(447) 评论(0) 推荐(1)

metro app 里面那几个合约 ,请求
摘要:search合约using Windows.ApplicationModel.DataTransfer;SearchPane.GetForCurrentView().SuggestionsRequested += OnSuggestionsRequested;//当点击右边的search 按钮是触发void OnSuggestionsRequested(SearchPane sender, SearchPaneSuggestionsRequestedEventArgs args){ string query = args.QueryText.ToLower();string[] terms = 阅读全文

posted @ 2012-09-19 10:35 GIS-MAN 阅读(570) 评论(0) 推荐(0)

metro 拖动元素 元素
摘要:public sealed partial class MainPage : Page { // Global Transform used to change the position of the Rectangle. private TranslateTransform dragTranslation; // Constructor public MainPage() { InitializeComponent(); // Add handler for the Ma... 阅读全文

posted @ 2012-09-18 14:24 GIS-MAN 阅读(328) 评论(0) 推荐(0)

metro 下载xml文件
摘要:public class downClass1 { public IStorageFile pResultStorageFile; public async Task<IStorageFile> down() { string CountriesFile = "fruit.xml"; StorageFolder InstallationFolder = Windows.ApplicationModel.Package.Current.InstalledLocation; Storage... 阅读全文

posted @ 2012-09-17 17:41 GIS-MAN 阅读(230) 评论(0) 推荐(0)

判断gridview 滑动到最右端
摘要:首先获得girdview 里面的scrollviewer, private ChildType FindVisualChild<ChildType>(DependencyObject obj) where ChildType : DependencyObject { //if (obj != null) //{ for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++) { Dependen... 阅读全文

posted @ 2012-09-17 11:34 GIS-MAN 阅读(775) 评论(2) 推荐(0)

关于查找可视树的一点问题
摘要:不能在pageload时间里面查找 阅读全文

posted @ 2012-09-17 10:44 GIS-MAN 阅读(115) 评论(0) 推荐(0)

怎么给listbox 的item 添加动画?
摘要:<GridView Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Height="600" x:Name="testAdvs" SelectionMode="None" Width="1200" ItemsSource="{Binding Path=Advertisements}"> <GridView.ItemsPanel&g 阅读全文

posted @ 2012-09-14 11:20 GIS-MAN 阅读(357) 评论(0) 推荐(0)

怎么给listbox 的item 添加动画1?
摘要:<GridView Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Height="600" x:Name="testAdvs" SelectionMode="None" Width="1200" ItemsSource="{Binding Path=Advertisements}"> <GridView.ItemsPanel&g 阅读全文

posted @ 2012-09-14 11:20 GIS-MAN 阅读(515) 评论(0) 推荐(0)

关于variablewrapgrid
摘要:http://msdn.microsoft.com/zh-cn/library/windows/apps/hh969155.aspxVariableSizedWrapGrid元素以行或列排列,当达到MaximumRowsOrColumns值会时会自动换行至新行或新列。由Orientation属性指定是按行还是列排列元素。通过使用附加属性VariableSizedWrapGrid.RowSpan和VariableSizedWrapGrid.ColumnSpan,内容可跨越多行和多列。根据ItemHeight和ItemWidth属性的指定设置元素大小。如果子内容超出面板,则不会超出面板边界且视觉上 阅读全文

posted @ 2012-09-13 16:16 GIS-MAN 阅读(445) 评论(0) 推荐(0)

支持metro style app 的框架已经出来了
摘要:mvvmlight toolkit 和mvvm helpers for metrocaliburn。micro 阅读全文

posted @ 2012-09-12 18:42 GIS-MAN 阅读(232) 评论(0) 推荐(0)

转一个orbitpanel
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Windows.Foundation;using Windows.UI.Xaml;using Windows.UI.Xaml.Controls;namespace App8{ public class orbitpanel:Panel { int i = 0; public int orbitsnunber {... 阅读全文

posted @ 2012-09-12 15:38 GIS-MAN 阅读(277) 评论(0) 推荐(0)

碎知识
摘要:设置点击输入框时弹出的键盘类型: <TextBox.InputScope> <InputScope> <InputScope.Names> <InputScopeName NameValue="Number" /> </InputScope.Names> </InputScope> </TextBox.InputScope>其中NameValue的值即为弹出的键盘类型,可以根据自己需要进行改变page gets several events in sequence 页面事件执行顺序:• On 阅读全文

posted @ 2012-09-10 15:10 GIS-MAN 阅读(175) 评论(0) 推荐(0)

VS 11 Split application程序解析
摘要:先看看怎么把一个page 搞成启动业 页在 onLanched 事件里面把, Window.Current.Content = _rootFrame; Window.Current.Activate(); var _rootFrame = new Frame(); _rootFrame.Navigate(typeof(ItemsPage), sampleData.ItemGroups);///首先是设置 Window.Current.Content属性,然后.Activate();然后看看ItemsPage 里面有什么 ,看继承关系吧public sealed partial class I. 阅读全文

posted @ 2012-09-10 10:34 GIS-MAN 阅读(372) 评论(0) 推荐(0)

async await ,一步一步试用
摘要:public class downClass1 { public IStorageFile pResultStorageFile; public async Task<IStorageFile> down() { string CountriesFile = "fruit.xml"; StorageFolder InstallationFolder =Windows.ApplicationModel.Package.Current.InstalledLocation; ... 阅读全文

posted @ 2012-09-05 16:49 GIS-MAN 阅读(356) 评论(0) 推荐(0)

File I/O in Windows Runtime
摘要:The following obtains a directory listing of all files in the documents folder:StorageFolder docsFolder = KnownFolders.DocumentsLibrary;IReadOnlyList<StorageFile> files = await docsFolder.GetFilesAsync();foreach (IStorageFile file in files)Debug.WriteLine (file.Name);The CreateFileQueryWithOpt 阅读全文

posted @ 2012-09-05 14:19 GIS-MAN 阅读(326) 评论(0) 推荐(0)

TCP in Windows Runtime(运行时)
摘要:Windows.Networking.Sockets namespaceAs with the .NET implementation, there are two primary classes to handle server and client roles. In WinRT, these are StreamSocketListener and StreamSocket.The following method starts a server on port 51111, and waits for a client to connect,It then reads a single 阅读全文

posted @ 2012-09-05 11:38 GIS-MAN 阅读(560) 评论(0) 推荐(0)

FlipView 知识准备
摘要:<FlipView x:Name = "flipView1" Width = "480" Height = "270" BorderBrush = "Black" BorderThickness ="1"> <FlipView.ItemTemplate> <DataTemplate> <Grid > <Image Width = "480" Height = "270" Source = "{ 阅读全文

posted @ 2012-09-05 10:29 GIS-MAN 阅读(306) 评论(0) 推荐(0)

导航