摘要: json解析数据1 public static T DataContractJsonDeSerializer<T>(string jsonString) 2 { 3 var ds = new DataContractJsonSerializer(typeof(T)); 4 var ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString)); 5 T obj = (T)ds.ReadObject(ms); 6 ms.Dispo... 阅读全文
posted @ 2012-07-11 16:17 win_and_first 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 实例URLhttp://news.ifeng.com/rss/world.xml 1 public async void LoadXmlToString(string xmlData, string rssKind) 2 { 3 DateTime now = DateTime.Now; 4 Debug.WriteLine(now); 5 XElement xelem = XElement.Parse(xmlData); 6 IEnumerable<XElement> items =... 阅读全文
posted @ 2012-07-11 12:56 win_and_first 阅读(514) 评论(0) 推荐(0) 编辑
摘要: 1 <GridView.ItemsPanel> 2 <ItemsPanelTemplate> 3 <VirtualizingStackPanel Orientation="Horizontal"/> 4 </ItemsPanelTemplate> 5 </GridView.ItemsPanel> 6 <GridView.GroupStyle> 7 <Gr... 阅读全文
posted @ 2012-07-11 12:26 win_and_first 阅读(371) 评论(0) 推荐(0) 编辑
摘要: In Windows 8, your apps run on a variety of screen sizes and under various view states. A user might have your app snapped to the side of a 25-inch desktop monitor, or fill the whole screen of a 10-inch widescreen tablet. In each case, you want your app to take full advantage of the available space. 阅读全文
posted @ 2012-07-11 10:58 win_and_first 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 数据存储 3 /// </summary> 4 /// <typeparam name="T"></typeparam> 5 /// <param name="data"></param> 6 /// <param name="fileName"></param> 7 /// <returns></returns> 8 public static async Task Sa 阅读全文
posted @ 2012-07-11 10:23 win_and_first 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 1 public static ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings; 2 3 public static void saveData(string name, string value) 4 { 5 6 localSettings.Values[name] = value; 7 } 8 /************************* 9 *FUNC 获取对应文件名的数... 阅读全文
posted @ 2012-07-11 10:20 win_and_first 阅读(190) 评论(0) 推荐(0) 编辑
摘要: <DataTemplate x:Key="Standard250x250ItemTemplate"> <Grid HorizontalAlignment="Center" Width="250" Height="250"> <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}"> <Image Source="{Binding Image 阅读全文
posted @ 2012-07-11 10:15 win_and_first 阅读(224) 评论(1) 推荐(0) 编辑
摘要: Window.Current.SizeChanged += this.WindowSizeChanged; private void WindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { if (this._useFilledStateForNarrowWindow) this.InvalidateVisualState(); switch (Windows.UI.ViewManagement.ApplicationView.V... 阅读全文
posted @ 2012-07-11 09:58 win_and_first 阅读(377) 评论(0) 推荐(0) 编辑