Conversation
|
This is how i would imagine #42 would be api-wise, @andrewbabbittdev what do you think? |
|
Mmmm generally prefer to start with a design proposal before starting on a PR @russkyc I would still like to see one filled out to go with this PR. It is under the issue templates. I just got back from vacation so I wont have time to go over this for a little as I catch up on work and other stuff. |
|
Took a peek over things, and yeah would still like to see a design doc for this. As I stated in #42
While moving to options for configuration is nice, it really doesn't get us closer to where we want to be; which is better accessibility to window configuration. Instead we could probably just use configuration binding directly to the windows then pass the window directly as the configure object: https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationbinder.bind?view=net-10.0-pp Root components in this PR are being configured statically as This does bring the question of how these should be done as well, as there are multiple options with different tradeoffs (again, this is why we ask for design proposals BEFORE starting coding work 🙂). This also gets into how navigation works with Blazor. You have a user select a specific component to display, but what about url based routing? Why not just setup child windows the same way as the main window and use the BlazorWebView.StartPath property instead to let the user route to a specific page in the newly created window? I also just looked at STAThread (#65) still ideally needs to be resolved as a part of this. |
Multi Window Support
Summary
New files
Modified files
Breaking change
BlazorDesktopWindow is no longer registered in the DI container. Code that injected it directly must use IWindowManager.MainWindow.NativeWindow instead.
Test plan