Closed hummy123 closed 2 years ago
You need to use new Avalonia api IStorageProvider https://github.com/wieslawsoltes/SvgToXaml/blob/09495e9120e19dce91b65ad5e53d4990a0114dd8/src/SvgToXaml.Base/ViewModels/StorageService.cs#L58-L75 and file picker api: https://github.com/wieslawsoltes/SvgToXaml/blob/09495e9120e19dce91b65ad5e53d4990a0114dd8/src/SvgToXaml.Base/ViewModels/MainWindowViewModel.cs#L172-L250
Thanks for the feedback. I got a deprecation warning in the IDE for the Open/SaveFileDialog APIs, but thought that was about the APIs being deprecated in WPF (not sure if the Avalonia documentation mentions the new APIs).
I'll get to it soon hopefully.
Thanks for the feedback. I got a deprecation warning in the IDE for the Open/SaveFileDialog APIs, but thought that was about the APIs being deprecated in WPF (not sure if the Avalonia documentation mentions the new APIs).
I'll get to it soon hopefully.
I use preview version so docs are not yet updated.
@hummy123 I am in middle of updating my project to new Avalonia version ,this project was next in line, I will push some updates to main branch.
@hummy123 I am in middle of updating my project to new Avalonia version ,this project was next in line, I will push some updates to main branch.
Thanks for letting me know. I'll wait until the upgrade is done to fix the conflicts (the new APIs you linked to are done on my side) and let you know when I think it's in a state to be merged.
I have fixed conflicts
Worth noting perhaps that the open and save file dialog commands take in a
new Window()
in theirShowAsync
method instead of using the parent window, which works absolutely fine from my manual tests.I wasn't able to send the parent window to the MainViewModel in all cases because I couldn't find a way to access the main window in the else-statement below.
Happy to make any changes if requested.