Hitchhiker's guide to the win8

626 views

Published on

2 Comments
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
626
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide

Hitchhiker's guide to the win8

  1. 1. 안녕하세요김주아입니다.Dongduk Women’s UniversityMicrosoft Student Partners 5thStudent + Woman + DeveloperMicrosoft R&D Intern
  2. 2. Who am I ?Imagine cup 2012Windows Metro style App Challenge 3rd Place
  3. 3. http://dev.windows.com/apps
  4. 4. public class FeedData public class FeedItem{ { public string Title { get; set; } public string Title { get; set; } public string Description { get; set; } public string Content { get; set; } public DateTime PubDate { get; set; } public DateTime PubDate { get; set; } public ImageSource Image { get; set; } public Uri Link { get; set; } public List<FeedItem> Items { get; set; } public ImageSource Image} }
  5. 5. private async Task<FeedData> GetFeedAsync(string feedUriString){ // using Windows.Web.Syndication; SyndicationClient client = new SyndicationClient(); Uri feedUri = new Uri(feedUriString); public async Task GetFeedsAsync() SyndicationFeed feed = await client.RetrieveFeedAsync(feedUri); { FeedData feedData = new feed1 = Task<FeedData> FeedData(); feedData.Title = feed.Title.Text; GetFeedAsync("http://cartoon.media.daum.net/webtoon/rss/koala"); feedData.Description = feed.Subtitle.Text; this.Feeds.Add(await feed1); feedData.PubDate = feed.Items[0].PublishedDate.DateTime; } foreach (SyndicationItem item in feed.Items) { FeedItem feedItem = new FeedItem(); feedItem.Title = item.Title.Text; feedItem.PubDate = item.PublishedDate.DateTime; feedItem.Content = item.Summary.Text; feedItem.Link = item.Links[0].Uri; feedItem._imagePath = item.Summary.Text.Substring(10, item.Summary.Text.Length - 10 - (item.Title.Text.Length + 2) feedData._imagePath = item.Summary.Text.Substring(10, item.Summary.Text.Length - 10 - (item.Title.Text.Length + 2) feedData.Items.Add(feedItem); } return feedData;}
  6. 6. <ResourceDictionary> <local:FeedDataSource x:Key="feedDataSource"/></ResourceDictionary>ItemPage.xaml.cs Loadstate에 추가 FeedDataSource feedDataSource =(FeedDataSource)App.Current.Resources["feedDataSource"];if (feedDataSource != null){ if (feedDataSource.Feeds.Count == 0) { await feedDataSource.GetFeedsAsync(); } this.DefaultViewModel["Items"] = feedDataSource.Feeds;}
  7. 7. ItemsPage.csvoid ItemView_ItemClick(object sender, ItemClickEventArgs e){ this.Frame.Navigate(typeof(SplitPage), e.ClickedItem);}
  8. 8. SplitPage.xaml<Gridx:Name="itemDetailGrid"> <WebView x:Name="contentView" Grid.Row="1" Margin="0"/></Grid>
  9. 9. SplitPage.xaml.csprotected override void LoadState(Object navigationParameter, Dictionary<String,Object> pageState){ FeedData feedData = navigationParameter as FeedData; if (feedData != null) { this.DefaultViewModel["Group"] = feedData; this.DefaultViewModel["Items"] = feedData.Items; }}
  10. 10. SplitPage.xaml.csvoid ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e){ Selector list = (Selector)sender; FeedItem selectedItem = (FeedItem)list.SelectedItem; if (selectedItem != null) { this.contentView.Navigate(selectedItem.Link); } else { this.contentView.NavigateToString(""); }}
  11. 11. http://msdn.microsoft.com/ko-kr/library/windows/apps/xaml/br211380.aspx
  12. 12. 김주아Jua Alice KimMicrosoft Korea R&D Intern

×