dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
615 stars 40 forks source link

In unpackaged apps window size and position does't persist #95

Closed SoftEntwickler closed 1 year ago

SoftEntwickler commented 1 year ago

Persistanse does not work in unpackaged apps(if WindowsPackageType is set to None in *.csproj). As I can see WinUIEx uses Windows.Storage.ApplicationData.Current.LocalSettings for saving and loading window size and position. But unpackaged apps can't use Windows.Storage.ApplicationData.Current.LocalSettings.

dotMorten commented 1 year ago

This is documented in the api reference and is as designed: https://dotmorten.github.io/WinUIEx/api/WinUIEx.WindowManager.html#WinUIEx_WindowManager_PersistenceStorage

Also see sample https://github.com/dotMorten/WinUIEx/blob/a727a22e82522ad7eee109094607bfe0dc51f96f/src/WinUIExSample/App.xaml.cs#L35