mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-13 18:16:49 -07:00
ViewModelProperties namespaces converted to static member properties. (#306)
This commit is contained in:
parent
4b6b8fa8fa
commit
3bff99b323
15 changed files with 142 additions and 183 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue