ViewModelProperties namespaces converted to static member properties. (#306)

This commit is contained in:
Daniel Belcher 2019-03-20 09:56:59 -07:00 committed by Stephanie Anderl
commit 3bff99b323
15 changed files with 142 additions and 183 deletions

View file

@ -105,9 +105,9 @@ void MainPage::OnNavigatedTo(NavigationEventArgs^ e)
else
{
ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings;
if (localSettings->Values->HasKey(ApplicationViewModelProperties::Mode))
if (localSettings->Values->HasKey(ApplicationViewModel::ModePropertyName))
{
initialMode = NavCategory::Deserialize(localSettings->Values->Lookup(ApplicationViewModelProperties::Mode));
initialMode = NavCategory::Deserialize(localSettings->Values->Lookup(ApplicationViewModel::ModePropertyName));
}
}
@ -122,7 +122,8 @@ void MainPage::WindowSizeChanged(_In_ Platform::Object^ /*sender*/, _In_ Windows
void MainPage::OnAppPropertyChanged(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e)
{
if (e->PropertyName->Equals(ApplicationViewModelProperties::Mode))
String^ propertyName = e->PropertyName;
if (propertyName == ApplicationViewModel::ModePropertyName)
{
ViewMode newValue = m_model->Mode;
ViewMode previousMode = m_model->PreviousMode;
@ -186,7 +187,7 @@ void MainPage::OnAppPropertyChanged(_In_ Platform::Object^ sender, _In_ Windows:
SetTitleBarControlColors();
SetDefaultFocus();
}
else if (e->PropertyName->Equals(ApplicationViewModelProperties::CategoryName))
else if (propertyName == ApplicationViewModel::CategoryNamePropertyName)
{
SetHeaderAutomationName();
AnnounceCategoryName();