private void OpenHelpPage(object sender, HelpPageViewModel viewModel) { var page = new HelpPage(viewModel); NavigationPage.SetHasBackButton(page, true); MainPage.Navigation.PushAsync(page); }
public void Initialize() { SetupBaseMocks(); currentlySelectedFactory.Setup(x => x.SelectedUser).Returns(new Models.User() { fullName = "Me Myselft" }); platformStuff = new Mock <IPlatformStuff>(); platformStuff.Setup(x => x.GetAppName()).Returns("<app name>"); platformStuff.Setup(x => x.GetVersion()).Returns("<some version>"); sendEmailService = new Mock <ISendEmailService>(); sut = new HelpPageViewModel(currentlySelectedFactory.Object, sendEmailService.Object, platformStuff.Object); }
public HelpPage() { InitializeComponent(); this.viewModel = new HelpPageViewModel(); this.viewModel.AppbarStateUpdated += new AppbarStateUpdatedEventHandler(viewModel_AppbarStateUpdated); this.DataContext = viewModel; this.Background = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255)); this.SupportedOrientations = SupportedPageOrientation.Portrait; this.ApplicationBar = new ApplicationBar(); this.ApplicationBar.IsMenuEnabled = true; this.ApplicationBar.ForegroundColor = Colors.White; this.ApplicationBar.BackgroundColor = Color.FromArgb(0xFF, 0x31, 0x99, 0xCC); previous = new ApplicationBarIconButton(new Uri("/icons/Appbar/Appbar.previous.png", UriKind.Relative)); previous.Text = AppResources.PreviousApplicationBarText; previous.Click += new EventHandler(previous_Click); next = new ApplicationBarIconButton(new Uri("/icons/Appbar/Appbar.next.png", UriKind.Relative)); next.Text = AppResources.NextApplicationBarText; next.Click += new EventHandler(next_Click); this.ApplicationBar.Buttons.Add(previous); this.ApplicationBar.Buttons.Add(next); this.TitleTextBox.Foreground = new SolidColorBrush(Color.FromArgb(255, 140, 138, 140)); this.DetailsTextBox.Foreground = new SolidColorBrush(Color.FromArgb(255, 160, 160, 160)); this.AboutButton.Background = new SolidColorBrush(Color.FromArgb(255, 49, 153, 204)); this.AboutButton.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 49, 153, 204)); this.AboutButton.Foreground = new SolidColorBrush(Colors.White); this.viewModel.UpdateAppbarStates(); }
public HelpPage(HelpPageViewModel viewModel) { InitializeComponent(); BindingContext = viewModel; }
public HelpView(string url = LinksContainer.HelpCenter) { InitializeComponent(); BindingContext = new HelpPageViewModel(url, new PageService()); }