private void Page_Load(System.Object sender, System.Windows.RoutedEventArgs e) { MySchoolInfo schoolInfo = default(MySchoolInfo); schoolInfo = new MySchoolInfo(); ApplicationBar.Opacity = 0.5; ApplicationTitle.Text = schoolInfo.SchoolName; }
private void Page_Loaded(System.Object sender, System.Windows.RoutedEventArgs e) { string pgUrl = ""; string pgTitle = ""; MySchoolInfo schoolInfo = default(MySchoolInfo); schoolInfo = new MySchoolInfo(); ApplicationBar.Opacity = 0.5; ApplicationTitle.Text = schoolInfo.SchoolName; if ((!NetworkInterface.GetIsNetworkAvailable())) { //' game's over, an internet connection is required NavigationService.Navigate(new Uri("/PanoramaPage1.xaml", UriKind.Relative)); } try { //Parses a query string NavigationContext.QueryString.TryGetValue("url", out pgUrl); NavigationContext.QueryString.TryGetValue("title", out pgTitle); PageTitle.Text = pgTitle; WebBrowser1.Navigate(new Uri(pgUrl, UriKind.Absolute)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public PanoramaPage1() { InitializeComponent(); schoolInfo = new MySchoolInfo(); Panorama.Title = schoolInfo.SchoolName; }
public RSSFeed() { InitializeComponent(); schoolInfo = new MySchoolInfo(); ApplicationBar.Opacity = 0.5; Rectangle verticalFillRectangle = new Rectangle(); verticalFillRectangle.Width = 200; verticalFillRectangle.Height = 100; //'Create a vertical linear gradient LinearGradientBrush myVerticalGradient = new LinearGradientBrush(); myVerticalGradient.StartPoint = new Point(0.5, 0); myVerticalGradient.EndPoint = new Point(0.5, 1); GradientStop stop1 = new GradientStop(); stop1.Color = schoolInfo.Color1.Color; stop1.Offset = 0.33; GradientStop stop2 = new GradientStop(); stop2.Color = schoolInfo.Color2.Color; stop2.Offset = 0.66; myVerticalGradient.GradientStops.Add(stop1); myVerticalGradient.GradientStops.Add(stop2); listboxRSSFeedItems.Background = myVerticalGradient; }
private void ShowContacts(List<ContactInfo> contactList) { // add results to listbox MySchoolInfo schoolinfo = new MySchoolInfo(); listBoxContactList.Items.Clear(); bool alternate = true; foreach (ContactInfo item in contactList) { if (alternate) { item.ItemColor = schoolinfo.Color1; } else { item.ItemColor = schoolinfo.Color2; } alternate = !alternate; listBoxContactList.Items.Add(item); } }