You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add new code sample for GUIConsole using WinUI 3 - Windows App SDK v1.1 #13851
I'm creating a WinUI 3 Desktop application (using VS 2022 17.3 Blank App WinUI 3 in Desktop template) where I'd like to use the Windows Terminal API to create a terminal window control to use inside my application.
I started by looking at your GUIConsole.WPF sample that is written in WPF for .NET Framework 4.6.1.
I tried to port the classes and the XAML window but I'm not able to let it work. I still have errors both on XAML and on code.
Proposed technical implementation details
Can you please add a new version of the code sample that is written using the new Windows App SDK v1.1?
Create a version of the sample that uses WinUI3 & WASDK
Create a Terminal Control to use in a WASDK app
The first is probably a lot easier. The sample is mostly illustrative of the ConPTY APIs. All of the GUIConsole.ConPTY project should work the same in WASDK. The GUIConsole.WPF project is more of a placeholder app - it shows how to wire that up to some UI layer, but I'd never recommend anyone build production code on top of that. It's a viable place to start to understand the APIs, but appending lines to a text block is a terribly un-performant way of rendering text.
The second is... much harder. We do have a TermControl written for WinUI2 today. It's not ready for someone to take a dependency on it, for sure. I don't think we're doing anything MUX 2.x with it though, but there's definitely gaps before it's ready to be used in WinUI 3. We're tracking productizing that control in #6999.
I'll use this issue to track the first point. Thanks!
It is what I was looking for at the beginning of my project. But then, when I saw that the Windows Terminal also has APIs, I thought it might be worth a try and I find out the GUIConsole WPF sample.
...but I'd never recommend anyone build production code on top of that. It's a viable place to start to understand the APIs, but appending lines to a text block is a terribly un-performant way of rendering text.
Thanks for the hint!
Given this consideration, would it be possible to improve the code sample to let it use a better approach?
Given this consideration, would it be possible to improve the code sample to let it use a better approach
I mean, maybe? But the point of that sample isn't really an exercise in performant text rendering, it's more about "how do I use the conpty APIs in a WPF application". In that sense, the sample does quite well. We certainly don't have the bandwidth to optimize that sample farther, but I wouldn't reject PRs to it. I'd rather spend our efforts on the real solution. If you're serious about embedding a terminal control in your application, then #6999 is probably what you'd be more interested in.
Nope, no progress on this front. EDIT: To clarify, this is in the Icebox, which basically means we don't expect the core team to ever have the resources to get around to this. We'd definitely accept community contributions though.
Activity
zadjii-msft commentedon Aug 25, 2022
Alrighty so there's kinda two separate bits here:
The first is probably a lot easier. The sample is mostly illustrative of the ConPTY APIs. All of the
GUIConsole.ConPTYproject should work the same in WASDK. TheGUIConsole.WPFproject is more of a placeholder app - it shows how to wire that up to some UI layer, but I'd never recommend anyone build production code on top of that. It's a viable place to start to understand the APIs, but appending lines to a text block is a terribly un-performant way of rendering text.The second is... much harder. We do have a TermControl written for WinUI2 today. It's not ready for someone to take a dependency on it, for sure. I don't think we're doing anything MUX 2.x with it though, but there's definitely gaps before it's ready to be used in WinUI 3. We're tracking productizing that control in #6999.
I'll use this issue to track the first point. Thanks!
OculiViridi commentedon Aug 25, 2022
That would be AWESOME! ❤️
It is what I was looking for at the beginning of my project. But then, when I saw that the Windows Terminal also has APIs, I thought it might be worth a try and I find out the GUIConsole WPF sample.
Thanks for the hint!
Given this consideration, would it be possible to improve the code sample to let it use a better approach?
Thanks a lot!
zadjii-msft commentedon Aug 25, 2022
I mean, maybe? But the point of that sample isn't really an exercise in performant text rendering, it's more about "how do I use the conpty APIs in a WPF application". In that sense, the sample does quite well. We certainly don't have the bandwidth to optimize that sample farther, but I wouldn't reject PRs to it. I'd rather spend our efforts on the real solution. If you're serious about embedding a terminal control in your application, then #6999 is probably what you'd be more interested in.
OculiViridi commentedon Jan 10, 2024
Mike Griese (@zadjii-msft) Are there any news about those 2 arguments?
zadjii-msft commentedon Jan 10, 2024
Nope, no progress on this front. EDIT: To clarify, this is in the Icebox, which basically means we don't expect the core team to ever have the resources to get around to this. We'd definitely accept community contributions though.