You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Zune settings created very early in development, before we had a good handle on architecture. We've learned the hard way to just put View code in the control code-behind, instead of trying to put View code in a ViewModel.
What to do
In StrixMusic.Shells.ZuneDesktop.Controls.Views.Settings, the SettingsView is doing a couple of strange things that need to be cleaned up or removed:
Remove the dedicated ZuneDesktopSettingsViewModel and move code into the SettingsView control.
Use the ZuneDesktopSettings directly. This uses OwlCore's SettingsBase, which implements INPC for settings already, so we can just bind to the properties.
Remove the call to SaveAsync in property setters.
In the SaveClicked event handler, call SaveAsync() on ZuneDesktopSettings
In the CancelClicked event handler, call the LoadAsync() method on ZuneDesktopSettings to reload the persisted values into memory and overwrite unsaved changes.
The text was updated successfully, but these errors were encountered:
Overview
The Zune settings created very early in development, before we had a good handle on architecture. We've learned the hard way to just put View code in the control code-behind, instead of trying to put View code in a ViewModel.
What to do
In
StrixMusic.Shells.ZuneDesktop.Controls.Views.Settings
, theSettingsView
is doing a couple of strange things that need to be cleaned up or removed:ZuneDesktopSettingsViewModel
and move code into theSettingsView
control.ZuneDesktopSettings
directly. This uses OwlCore'sSettingsBase
, which implements INPC for settings already, so we can just bind to the properties.SaveAsync
in property setters.SaveClicked
event handler, callSaveAsync()
on ZuneDesktopSettingsCancelClicked
event handler, call theLoadAsync()
method on ZuneDesktopSettings to reload the persisted values into memory and overwrite unsaved changes.The text was updated successfully, but these errors were encountered: