/samples/Microsoft.AspNet.SignalR.Client.WP7.Sample/DetailsPage.xaml.cs
https://github.com/mip1983/SignalR · C# · 36 lines · 32 code · 2 blank · 2 comment · 1 complexity · 1b53f4bca375af9c2533f9b050e466fd MD5 · raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Animation;
- using System.Windows.Shapes;
- using System.Windows.Navigation;
- using Microsoft.Phone.Controls;
- namespace Microsoft.AspNet.SignalR.Client.WP7.Sample
- {
- public partial class DetailsPage : PhoneApplicationPage
- {
- // Constructor
- public DetailsPage()
- {
- InitializeComponent();
- }
- // When page is navigated to set data context to selected item in list
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- string selectedIndex = "";
- if (NavigationContext.QueryString.TryGetValue("selectedItem", out selectedIndex))
- {
- int index = int.Parse(selectedIndex);
- DataContext = App.ViewModel.Items[index];
- }
- }
- }
- }