Hitchhiker's guide to the win8
Upcoming SlideShare
Loading in...5
×
 

Hitchhiker's guide to the win8

on

  • 659 views

 

Statistics

Views

Total Views
659
Views on SlideShare
659
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
2

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Hitchhiker's guide to the win8 Hitchhiker's guide to the win8 Presentation Transcript

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