Skip to content

Productize the WPF, UWP Terminal Controls #6999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 3 tasks
zadjii-msft opened this issue Jul 22, 2020 · 9 comments
Open
2 of 3 tasks

Productize the WPF, UWP Terminal Controls #6999

zadjii-msft opened this issue Jul 22, 2020 · 9 comments
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-WPFControl Things related to the WPF version of the TermControl Issue-Scenario Product-Terminal The new Windows Terminal.

Comments

@zadjii-msft
Copy link
Member

zadjii-msft commented Jul 22, 2020

This scenario tracks the remaining work to productize the UWP and WPF versions of the Terminal Control. These will allow 3rd-party developers to embed terminal instances in their applications. That way, external developers won't need to write their own terminals, they can just re-use the one we build in this repo.

Currently, the Windows Terminal uses the UWP version of the control. Similarly, Visual Studio embeds the WPF version.

Pre-Requisites

These tasks aren't immediately related, but will need to get done first to unblock this work

Tasks

## Tasks
- [x] Introduce abstraction layer between TermControl and TerminalCore (aka Interactivity) #6842
- [ ] Tear out the `SearchBoxControl` from the `TermControl`, so it can be its own control
- [ ] Remove the SharedShadow thing in SearchBoxControl, noted in #12913
- [ ] Finalize API boundary - Where is the real line between `TermControl` / `ControlInteractivity` / `ControlCore`?
- [ ] Re-base the WPF control on the shared `TerminalContent`.
- [ ] Package as a nuget
- [ ] Deploy to some nuget feed somewhere?
- [ ] #4572
- [x] #3337
- [ ] #13408
- [ ] https://github.com/microsoft/terminal/issues/15404
- [ ] https://github.com/microsoft/terminal/issues/6967
- [ ] https://github.com/microsoft/terminal/issues/6996
- [ ] https://github.com/microsoft/terminal/issues/5094
- [ ] Pasting is super wacky. The control shouldn't ask the app to paste to it.
- [ ] https://github.com/microsoft/terminal/issues/1304
- [ ] https://github.com/microsoft/terminal/issues/14407
- [ ] https://github.com/microsoft/terminal/issues/13681
- [ ] https://github.com/microsoft/terminal/issues/16404

related

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 22, 2020
@zadjii-msft zadjii-msft added ⛺ Reserved For future use and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 22, 2020
@zadjii-msft zadjii-msft changed the title [Reserved for future use] Productize the WPF, UWP Terminal Controls Feb 8, 2021
@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-WPFControl Things related to the WPF version of the TermControl Issue-Scenario Product-Terminal The new Windows Terminal. and removed Needs-Tag-Fix Doesn't match tag requirements ⛺ Reserved For future use labels Feb 8, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Feb 8, 2021
@minecraftchest1
Copy link

This is something that I would like to see, especially if it was done in such a way that it could be ported to other frameworks such as avaloniaui.

@OculiViridi
Copy link

This is something that I would like to see, especially if it was done in such a way that it could be ported to other frameworks such as avaloniaui.

And maybe also in Uno Platform UI too! 😉

@OculiViridi
Copy link

@zadjii-msft Any progress about those Tasks?

@zadjii-msft
Copy link
Member Author

Unfortunately nope. I think we originally slated this for late 2023, but alas, other internal priorities came in and bumped this. I think we fully intend to do this sometime SoonTM.

@OculiViridi
Copy link

Soon ™️.

Love it! 😆

Anyway, I'm thinking about moving (at least for Now ™️) to a web-based terminal emulator like xterm.js (or others) and embed it within a WebView control.
Maybe you can give me suggestions about this approach?
Thanks!

@Goldgom
Copy link

Goldgom commented Dec 31, 2024

End of 2024,any news about it?I am looking for a embedded terminal Control in WinUI3
I'v already tried the project https://github.com/Corillian/WindowsTerminal but it failed to work in my computer.
Or what can I do to finish this feature?

@mitchcapper
Copy link
Contributor

I was able to get it fully working as a WPF control per my sample repo.

@Goldgom
Copy link

Goldgom commented Jan 3, 2025

I was able to get it fully working as a WPF control per my sample repo.

What about WinUi3,my project is a fully WinUi3 project which can not embedde a WPF control in it.

@mitchcapper
Copy link
Contributor

@Goldgom My original example required their Terminal.WPF control so would not work on WinUI3, but I have an alpha solution as part of a sample library for peoples use.

Previously @zadjii-msft in this issue it was stated:

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.

My original WPF example was a fully embeddable WPF control although wasn't really in a library form. It wasn't enough of what the Terminal team was looking for, so I went ahead and put together a bit more formal of a library:

https://github.com/mitchcapper/EasyWindowsTerminalControl

It supports WPF and has an alpha WinUI3 library. The WPF version is built on the fairly solid foundation my prior example was put together on the Windows Terminal teams WPF control and conpty build. The WinUI3 version is more hacked together, as I had to write a WPF equivalent control which has a hacky custom port of HwndHost.

The library should support both render only uses and full interactive terminal sessions in a (hopefully) easy to use setup.

In theory just add EasyWindowsTerminalControl nuget package to your project and then

<term:EasyTerminalControl StartupCommandLine="pwsh.exe" />

and you should be good to go. For more details see the project page https://github.com/mitchcapper/EasyWindowsTerminalControl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-WPFControl Things related to the WPF version of the TermControl Issue-Scenario Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

6 participants