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
If SaveWindowPosition = true in the MetroWindow and TargetFramework = net9.0-windows the application throws an exception on closing and not saving the window position:
ZH.TED.Test.WPF Error: 0 : MahApps.Metro.Behaviors.WindowsSettingBehavior: The settings could not be saved! System.Configuration.ConfigurationErrorsException: Failed to save settings: An error occurred loading a configuration file: An unexpected error occurred in 'ClientConfigurationHost::OpenStreamForWrite '' '''.
---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: An unexpected error occurred in 'ClientConfigurationHost::OpenStreamForWrite '' '''.
---> System.InvalidOperationException: An unexpected error occurred in 'ClientConfigurationHost::OpenStreamForWrite '' '''.
at System.Configuration.ClientConfigurationHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
--- End of inner exception stack trace ---
at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
--- End of inner exception stack trace ---
at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
at System.Configuration.LocalFileSettingsProvider.SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection values)
at System.Configuration.SettingsBase.SaveCore()
at System.Configuration.SettingsBase.Save()
at MahApps.Metro.Behaviors.WindowsSettingBehavior.SaveWindowState()
Describe the bug
If
SaveWindowPosition = true
in the MetroWindow andTargetFramework = net9.0-windows
the application throws an exception on closing and not saving the window position:Steps to reproduce
Here is an example project:
ZH.TED.Test.WPF.zip
If you switch to net8.0-windows as TargetFramework, it works as expected.
Environment
The text was updated successfully, but these errors were encountered: