Microsoft-ui-xaml: Feature: TabView (dev tracking)

Created on 19 Apr 2019  路  5Comments  路  Source: microsoft/microsoft-ui-xaml

Tracking for #304

  • [x] Check in current state

    • [x] Remove and resolve all TODO comments



      • [x] Add resource lookup shared helper


      • [x] Don't attempt to select disabled items



    • [x] Add tests (1.5 days total)



      • [x] Initial selection


      • [x] Add/remove tabs


      • [x] Fixed vs. size to content width


      • [x] CanCloseTabs and IsCloseable


      • [x] Closing cancel event


      • [x] Closing selected tab selects new tab



  • [x] Add features (5 days)

    • [x] Contain a ListView instead of being a ListView; check accessibility and reenable all tests.

    • [x] Tear-away support

    • [x] Fixed width tabs

    • [x] Add IsClosing on TabViewItem

    • [x] Tooltip with full header if text is truncated

    • [x] CornerRadius knob available to change the rounding of the "tab" corners

    • [x] Add + button, bool to hide it, and event/command for when it is clicked

    • [ ] Fix bugs opened by terminal team

    • [x] CanCloseTabs IS a default

    • [x] Fix position of right content area

    • [x] Add action content area, if needed -- test out if the footer area can be a single slot

    • [x] Rename APIs to match spec (TabView -> TabControl, TabViewItem -> TabItem, TabClosingEventArgs, TabWidthMode, LeftContent -> TabStripHeader, RightContent -> TabStripFooter etc.)

    • [x] Update colors

    • [x] Tab separators

    • [x] Fix drag/drop issues

    • [x] TabClosing event should no longer actually close the tab; let the app do it.

  • [x] Accessibility (5 days)

    • [x] Focus rect on tabs

    • [x] Close button should not be tabbable

    • [x] Keyboarding -> ctrl-F4 closes a tab

    • [x] ctrl-tab and ctrl-shift-tab cycle between tabs

    • [x] Pressing right arrow from last tab moves focus to + button (if it's there) and pressing left goes back.

    • [x] Selection should NOT follow focus

    • [x] High contrast

  • [x] To test out

    • [x] Do mnemonic work?

    • [x] Can the control be left-aligned and not take up more space than it needs?

Steven's Found Bug List

  • [x] Setting TabView.Background should change the background of the TabStrip. (Currently it sets the background of the content)
  • [x] TabStrip doesn't care about RightContent's MinWidth (Currently the content gets pushed off the screen)
  • [x] I've never been able to get the bumpers to show up :(
  • [x] Adding a TabViewItem without an icon causes a crash
area-TabView team-Controls working on it

Most helpful comment

@teaP I noticed the TabView doesn't appear to have an ItemClick event like ListView has. This would be useful for the Ribbon implementation for collapsing the view as called out in this comment.

All 5 comments

Not to nag, but please ensure that CornerRadius can be set for the tabs, as the toolkit version of TabView and TabViewItem seem to ignore this property when set. Thanks.

Not to nag, but please ensure that CornerRadius can be set for the tabs, as the toolkit version of TabView and TabViewItem seem to ignore this property when set. Thanks.

No problem! This is a good reminder, I'll add it to the TODO list here so we don't forget about it.

TabBar placement, Top, Bottom, Left, Right

Placement on the sides could use the vertical text box control, I think it's in the community toolkit

@jevansaks Glad to see work on this is progressing nicely. IMO, another piece of functionality that should be added in the near future is the destruction of TabViewItem content when closing them. For instance, the toolkit version of the tabs control seems to not remove tab content from memory when they are closed, causing a steady increase in an application's memory footprint regardless of the tabs being closed. This is particularly problematic when a Frame is set as the tab's content.

I documented this behavior yesterday and filed a toolkit bug report containing a sample project to reproduce it.

I welcome any questions the community has for me on this topic.

@teaP I noticed the TabView doesn't appear to have an ItemClick event like ListView has. This would be useful for the Ribbon implementation for collapsing the view as called out in this comment.

Was this page helpful?
0 / 5 - 0 ratings