Skip to content

Add new code sample for GUIConsole using WinUI 3 - Windows App SDK v1.1 #13851

Open

Description

@OculiViridi

Description of the new feature/enhancement

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?

Activity

  1. added
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on Aug 25, 2022
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Aug 25, 2022
  3. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Aug 25, 2022
  4. zadjii-msft commented on Aug 25, 2022

    @zadjii-msft
    Member

    Alrighty so there's kinda two separate bits here:

    • 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!

  5. added
    Help WantedWe encourage anyone to jump in on these.
    Issue-DocsIt's a documentation issue that really should be on MicrosoftDocs/Console-Docs
    Product-MetaThe product is the management of the products.
    and removed
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on Aug 25, 2022
  6. OculiViridi commented on Aug 25, 2022

    @OculiViridi
    Author

    Create a Terminal Control to use in a WASDK app

    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.

    ...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?

    Thanks a lot!

  7. zadjii-msft commented on Aug 25, 2022

    @zadjii-msft
    Member

    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.

  8. added
    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Aug 25, 2022
  9. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Aug 25, 2022
  10. OculiViridi commented on Jan 10, 2024

    @OculiViridi
    Author

    Mike Griese (@zadjii-msft) Are there any news about those 2 arguments?

    1. Create a version of the sample that uses WinUI3 & WASDK
    2. Create a Terminal Control to use in a WASDK app
  11. zadjii-msft commented on Jan 10, 2024

    @zadjii-msft
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Help WantedWe encourage anyone to jump in on these.Issue-DocsIt's a documentation issue that really should be on MicrosoftDocs/Console-DocsProduct-MetaThe product is the management of the products.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions