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
When SaveWindowPosition is attached, the WindowPlacementSettings are not "upgraded" when the hosting program's version changes.
I don't see a way for a host to access the WindowPlacementSettings directly because they are protected and marked internal. It would also require a class definition to deserialize the window placement settings for each derived window type (I think). It seems possible the MahApps.Metro Library could upgrade these settings.
It appears based on my limited understanding that this could be accomplished as follows:
Add a UpgradeSettings property to IWindowPlacementSettings, which defaults to true
Add a void Upgrade() method to IWindowPlacementSettings, which is implemeneted by ApplicationSettingsBase
If on loading the UpgradeSettings flag is true, call _settings.Upgrade(), set the flag to false, and then _settings.Save()
This is the recommended way user settings are handled by programs.
The text was updated successfully, but these errors were encountered:
When SaveWindowPosition is attached, the WindowPlacementSettings are not "upgraded" when the hosting program's version changes.
I don't see a way for a host to access the WindowPlacementSettings directly because they are protected and marked internal. It would also require a class definition to deserialize the window placement settings for each derived window type (I think). It seems possible the MahApps.Metro Library could upgrade these settings.
It appears based on my limited understanding that this could be accomplished as follows:
UpgradeSettings
property toIWindowPlacementSettings
, which defaults totrue
void Upgrade()
method toIWindowPlacementSettings
, which is implemeneted byApplicationSettingsBase
UpgradeSettings
flag istrue
, call_settings.Upgrade()
, set the flag tofalse
, and then_settings.Save()
This is the recommended way user settings are handled by programs.
The text was updated successfully, but these errors were encountered: