HelpScreenPage.xaml.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Breda_Tour.Data;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Runtime.InteropServices.WindowsRuntime;
  8. using Windows.Foundation;
  9. using Windows.Foundation.Collections;
  10. using Windows.UI.Xaml;
  11. using Windows.UI.Xaml.Controls;
  12. using Windows.UI.Xaml.Controls.Primitives;
  13. using Windows.UI.Xaml.Data;
  14. using Windows.UI.Xaml.Input;
  15. using Windows.UI.Xaml.Media;
  16. using Windows.UI.Xaml.Navigation;
  17. // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
  18. namespace Breda_Tour.HelpScreen
  19. {
  20. /// <summary>
  21. /// An empty page that can be used on its own or navigated to within a Frame.
  22. /// </summary>
  23. public sealed partial class HelpScreenPage : Page
  24. {
  25. public ObservableCollection<HelpItem> HelpItems
  26. {
  27. get { return (ObservableCollection<HelpItem>)GetValue(HelpItemProperty); }
  28. set { SetValue(HelpItemProperty, value); }
  29. }
  30. public static readonly DependencyProperty HelpItemProperty =
  31. DependencyProperty.Register("HelpItems", typeof(ObservableCollection<HelpItem>), typeof(HelpScreenPage), null);
  32. public HelpScreenPage()
  33. {
  34. this.InitializeComponent();
  35. DefaultPivot.SetCheckedButton(Breda_Tour.CustomControls.DefaultPivotControl.Tab.Help);
  36. HelpPageDatabase helpDatabase = new HelpPageDatabase();
  37. HelpItems = helpDatabase.GetCurrentHelpItems();
  38. DataContext = this;
  39. }
  40. private void ListView_ItemClick(object sender, ItemClickEventArgs e)
  41. {
  42. HelpItem helpitem = (HelpItem)e.ClickedItem;
  43. MainPage.RootFrame.Navigate(typeof(HelpPage), helpitem);
  44. }
  45. }
  46. }