HelpView.xaml.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. using VocabManager.ViewModel;
  13. using Microsoft.Phone.Shell;
  14. namespace VocabManager.View
  15. {
  16. public partial class HelpView : UserControlBase
  17. {
  18. ApplicationBarIconButton _returnMainPageButton;
  19. public HelpView()
  20. {
  21. InitializeComponent();
  22. _returnMainPageButton = new ApplicationBarIconButton(new Uri(IconUrls.Back, UriKind.Relative));
  23. _returnMainPageButton.Text = "start";
  24. _returnMainPageButton.Click += new EventHandler(_returnMainPageButton_Click);
  25. }
  26. void _returnMainPageButton_Click(object sender, EventArgs e)
  27. {
  28. App.Instance.MainPage.LoadWelcomeView();
  29. }
  30. protected override void OnLoad()
  31. {
  32. base.OnLoad();
  33. StoreAppBarButtons();
  34. ContainerPage.ApplicationBar.Buttons.Clear();
  35. ContainerPage.ApplicationBar.Buttons.Add(_returnMainPageButton);
  36. }
  37. }
  38. }