07 2012 档案

摘要:BitmapImage bt = new BitmapImage(new Uri(this.BaseUri, "/Images/SinaDefault.png"));ImageBrush im = new ImageBrush();im.ImageSource = bt;image.Background = im; 阅读全文
posted @ 2012-07-15 10:21 win_and_first 阅读(212) 评论(0) 推荐(0)
摘要:private void itemView_ItemClick(object sender, ItemClickEventArgs e) { // Navigate to the split page, configuring the new page // by passing the clicked item (FeedItem) as a navigation parameter this.Frame.Navigate(typeof(SplitPage), e.ClickedItem); ... 阅读全文
posted @ 2012-07-12 18:01 win_and_first 阅读(381) 评论(0) 推荐(0)
摘要: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 阅读(441) 评论(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 阅读(531) 评论(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 阅读(386) 评论(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 阅读(289) 评论(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 阅读(531) 评论(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 阅读(204) 评论(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 阅读(243) 评论(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 阅读(387) 评论(0) 推荐(0)
摘要:Win8---XML样式修改 <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="OrientationStates"> <VisualState x:Name="FullScreenLandscape"/> <VisualState x:Name="Filled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetPr 阅读全文
posted @ 2012-07-06 16:41 win_and_first 阅读(441) 评论(0) 推荐(0)
摘要:This post is part of my Windows 8 / WInRT exploration and notes. This time, I’m digesting the WinRT Controls sample.This sample has quite a few more features to digest. There are six different control scenarios. This application supports landscape, portrait, and snapped orientations. As a result, th 阅读全文
posted @ 2012-07-06 16:17 win_and_first 阅读(318) 评论(0) 推荐(0)
摘要:断点续传其实就是在请求流的时候请求中间流,而不是每次重新从头来过HttpWebRequest Myrq = (HttpWebRequest)HttpWebRequest.CreateHttp(URL); Myrq.Headers["Range"] = "bytes=1024-";//设置Range值 这句就是请求1024位置开始到末尾的流如果Myrq.Headers["Range"] = "bytes=1024-2048";则表示请求1024到2048位置的数据有了这个方法,写断点续传就会简单许多了,错略的方法如下 阅读全文
posted @ 2012-07-04 19:10 win_and_first 阅读(167) 评论(0) 推荐(0)
摘要:开发环境:VisualStudio2010 +Silverlight4新建一个test.xaml,并添加ComboBox组合框控件,其Xaml代码如下:[xhtml] view plaincopy<ComboBoxx:Name="cmbBoxCategory"Height="28"Margin="105,69,182,0"VerticalAlignment="Top"SelectionChanged="cmbBoxCategory_SelectionChanged"DataContext= 阅读全文
posted @ 2012-07-04 18:03 win_and_first 阅读(300) 评论(0) 推荐(0)