Your SlideShare is downloading. ×
  • Like
Hitchhiker's guide to the win8
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Hitchhiker's guide to the win8

  • 343 views
Published

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
343
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
2
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 안녕하세요김주아입니다.Dongduk Women’s UniversityMicrosoft Student Partners 5thStudent + Woman + DeveloperMicrosoft R&D Intern
  • 2. Who am I ?Imagine cup 2012Windows Metro style App Challenge 3rd Place
  • 3. http://dev.windows.com/apps
  • 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. 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. <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. ItemsPage.csvoid ItemView_ItemClick(object sender, ItemClickEventArgs e){ this.Frame.Navigate(typeof(SplitPage), e.ClickedItem);}
  • 8. SplitPage.xaml<Gridx:Name="itemDetailGrid"> <WebView x:Name="contentView" Grid.Row="1" Margin="0"/></Grid>
  • 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. 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. http://msdn.microsoft.com/ko-kr/library/windows/apps/xaml/br211380.aspx
  • 12. 김주아Jua Alice KimMicrosoft Korea R&D Intern