Skip to content

Bind TerminalPage's TabView to TerminalPage::_tabs #3922

@leonMSFT

Description

@leonMSFT

Currently, Tab is a regular C++ class. This gives us some annoying headaches when trying to tie Tabs to the UI. For example, as described in #2740, TerminalPage keeps track of two separate vectors of Tab that need to be kept in sync. There's one vector of TabViewItems specifically used by the TabView and another vector of <shared_ptr<Tab>>. Updating one requires an update on the other one.

This could be avoided by using an observable vector of Tab that's bound to the XAML control. However, this requires Tab to be converted to a WinRT class. This would also make future attempts to use Tab in XAML controls much easier. (such as in #1502)

EDIT: as of #4350, Tab has been converted into a WinRT type, and TerminalPage::_tabs has been converted to an IObservableVector. What's left is to bind TerminalPage's TabView to that vector.

Metadata

Metadata

Assignees

Labels

Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions