Question: Is it possible to have each TabViewItem content(UI) running in its own process? #7438
Replies: 6 comments
-
I think this is actually what the Terminal app is doing? @miniksa is that the case? |
Beta Was this translation helpful? Give feedback.
-
This is what the Terminal is working on, but it's not trivial. Our content is mostly all Ours is not a plug-and-play solution. If you were doing anything more complex with your tab content, if you had elaborate XAML layouts per-tab, then this wouldn't work. XAML objects can't cross thread or process boundaries, so you can't have the content process hosting some tree of XAML, then hand that off to the window process to host in the window's UI tree. If you have a generic way of describing the content of your tab, then you could presumably communicate that to the window process and have the window render the UI on the content processes behalf. So, the window process would be responsible for the "View", and the content would be responsible for the "Model". I can't really comment on any other future plans by the WinUI or WinAppSDk team though. This was just our solution, and it's not even totally done for the Terminal yet 🙃 |
Beta Was this translation helpful? Give feedback.
-
@jevansaks and @MikeHillberg thoughts on if there are other solutions? |
Beta Was this translation helpful? Give feedback.
-
Honestly if there's another easier answer to this question, we're going to cry on the Terminal side. |
Beta Was this translation helpful? Give feedback.
-
Ha! Sadly for @harvinders (but happy for @miniksa ?) there is no easier solution today. Cross-process and cross-thread islands are something we want to make easy, but I couldn't say when. Things like WebView2 (which are a homegrown cross-process island if you think about it) are a whole lot of special work to get right. I wouldn't recommend it, but you could take a look at that code to be inspired about what you would need to do. Output redirection is easy but getting input forwarded and UIA/IME connected is not super fun. |
Beta Was this translation helpful? Give feedback.
-
Hah. Not strictly happy. I was just going to be frustrated if we spent a long time trying to figure out how to do this and the answer was just around the corner and we failed to see it. |
Beta Was this translation helpful? Give feedback.
-
We are creating an application which hosts plugins with their views in a TabView. I would like to understand
Is it possible, today, to host those views in their own processes, similar to what the edge does with tabs?
If not today, are there something in the roadmap that would enable it? What should we be looking out for on the roadmap? AppWindow?
If it is possible or would be possible in future, would that mean, we can have those views based on different versions of WinAppSDK?
Beta Was this translation helpful? Give feedback.
All reactions