Multiple Windows
See original GitHub issueIt occurred to me - why isn’t there some sort of level in the UI tree above Window? This would make synchronizing multiple windows a lot less trouble. Something like
App [
Window [ ]
Window [ ]
...
]
Alternately, the App level would have a single child which would be some collection of Windows. It might also make sense to instead of App call the root Context, since maybe there’s a reason why the developer would want more than one of them.
My use case is that I want a UI that’s friendly with multiple monitors. Something like Visual Studio’s dock system seems like a good place to start, and it would be nice to be able to easily break toolbars and such off into separate windows without having to mess with juggling state between multiple models and update paths.
Are there limitations in Avalonia itself which would make this annoying to implement? Maybe things to do with threading?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@keldor314 I have a sample for you that might work https://github.com/AngelMunoz/MultiWindow in that example I open each window as a
Dialog
but you can new the windows and show them/hide them based on the commands/subscriptions you may have based on that sampleI don’t think (given the nature of Avalonia itself, Avalonia doesn’t have a window tree either AFAIK) this is something possible for the moment
Please check the sample if you’re interested in this and let me know if there are some questions to that approach I’ll close this in the meanwhile
the windows would look like this on the constructor https://github.com/AvaloniaCommunity/Avalonia.FuncUI/blob/master/src/Examples/Examples.MusicPlayer/Shell.fs#L201-L212