From 4f3a3a5b190f4d6b8e0fa363ae0b48be331ade16 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 14 May 2019 09:09:35 -0400 Subject: [PATCH] stub out settings page --- src/App/Pages/Settings/SettingsPage.xaml | 63 ++++++++++--------- src/App/Pages/Settings/SettingsPage.xaml.cs | 6 +- .../Pages/Settings/SettingsPageViewModel.cs | 5 +- 3 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/App/Pages/Settings/SettingsPage.xaml b/src/App/Pages/Settings/SettingsPage.xaml index 64ec95a88..6f6fd7bf5 100644 --- a/src/App/Pages/Settings/SettingsPage.xaml +++ b/src/App/Pages/Settings/SettingsPage.xaml @@ -4,39 +4,46 @@ x:Class="Bit.App.Pages.SettingsPage" xmlns:pages="clr-namespace:Bit.App.Pages" xmlns:controls="clr-namespace:Bit.App.Controls" - xmlns:bv="clr-namespace:Bit.App.Controls.BoxedView" + xmlns:u="clr-namespace:Bit.App.Utilities" x:DataType="pages:SettingsPageViewModel" Title="{Binding PageTitle}"> - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/App/Pages/Settings/SettingsPage.xaml.cs b/src/App/Pages/Settings/SettingsPage.xaml.cs index b554e497a..78daa1579 100644 --- a/src/App/Pages/Settings/SettingsPage.xaml.cs +++ b/src/App/Pages/Settings/SettingsPage.xaml.cs @@ -10,11 +10,13 @@ namespace Bit.App.Pages { public partial class SettingsPage : ContentPage { + private SettingsPageViewModel _vm; + public SettingsPage() { InitializeComponent(); - var viewModel = BindingContext as SettingsPageViewModel; - viewModel.Page = this; + _vm = BindingContext as SettingsPageViewModel; + _vm.Page = this; } } } diff --git a/src/App/Pages/Settings/SettingsPageViewModel.cs b/src/App/Pages/Settings/SettingsPageViewModel.cs index c7cde98c3..7ca0a4e14 100644 --- a/src/App/Pages/Settings/SettingsPageViewModel.cs +++ b/src/App/Pages/Settings/SettingsPageViewModel.cs @@ -1,4 +1,5 @@ -using System; +using Bit.App.Resources; +using System; using System.Collections.Generic; using System.Text; using System.Windows.Input; @@ -10,7 +11,7 @@ namespace Bit.App.Pages { public SettingsPageViewModel() { - PageTitle = "Settings"; + PageTitle = AppResources.Settings; ButtonCommand = new Command(() => Page.DisplayAlert("Button 1 Command", "Button 1 message", "Cancel")); Button2Command = new Command(() => Page.DisplayAlert("Button 2 Command", "Button 2 message", "Cancel"));