Skip to content

Convert Tab's context flyout into a XAML control #7841

Open

Description

@leonMSFT

Tabs currently create their context flyout menu items in a big create function. It would be nice to convert that into a custom XAML control so that the more menu items we decide to add to the flyout, the easier it will be to manage. We should also design it in a way where different types of tabs (i.e. SettingsUI tab vs TerminalTab) can choose what menu items they would like to use.

Activity

  1. added
    Area-UserInterfaceIssues pertaining to the user interface of the Console or Terminal
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    on Oct 6, 2020
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Oct 6, 2020
  3. DHowett commented on Oct 6, 2020

    @DHowett
    Member

    Funny enough, I tried to do this (just having the context menu in a .xaml file) and it was a total pain to hook up the event handlers without introducing another class just to implement the events that could come out of the context menu 😄

  4. leonMSFT commented on Oct 6, 2020

    @leonMSFT
    ContributorAuthor

    Damn, it's not as easy as exposing the MenuFlyoutItems in the IDL and just being like menuflyoutitem.Click{function}?

  5. leonMSFT commented on Oct 6, 2020

    @leonMSFT
    ContributorAuthor

    Oh nvm I see, you tried it out by only having a XAML file?

  6. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Oct 9, 2020
  7. DHowett commented on Oct 9, 2020

    @DHowett
    Member

    Yep. Just a XAML file w/ a flyout, then one with a usercontrol w/ a flyout, then then then

  8. mdtauk commented on Oct 9, 2020

    @mdtauk

    Have you looked into using Xaml UserControls or CustomControls?

  9. DHowett commented on Oct 9, 2020

    @DHowett
    Member

    Martin Anderson (@mdtauk) most of our project is UserControls or CustomControls.

  10. mdtauk commented on Oct 9, 2020

    @mdtauk

    Martin Anderson (@mdtauk) most of our project is UserControls or CustomControls.

    Fair enough then lol

  11. zadjii-msft commented on Oct 9, 2020

    @zadjii-msft
    Member

    What if we just passed a ShortcutActionDispatch into the (theoretical) TabContextMenuControl? Then we could have the items in the flyout dispatch actions to that, routing them up to the Page as usual. We'll probably want that anyways, esp if we want to let users customize the content of that flyout.

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-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions