Microsoft-ui-xaml: TabView now enforces hard minimum and maximum 40, 250 in all sizing modes

Created on 23 Oct 2019  路  5Comments  路  Source: microsoft/microsoft-ui-xaml

Describe the bug
The change in #1393 to fix #1309 made TabView always enforce a minimum/maximum size, even in "Size to Content" mode. That's fine, but the default min/max width practically mean that the tabs don't size to their content. Should the defaults be 0 and infinity? Can I as an end user specify Infinite width? Is this mostly a documentation issue?

Steps to reproduce the bug

  1. Use TabView
  2. Add a TabViewItem whose Header is a short string, like ~

Expected behavior
A tab that looks like this crude ASCII sketch:

 _____ 
| ~ x |

Actual behavior

A tab that looks like this crude ASCII sketch:

 _____________ 
| ~         x |

Version Info

NuGet package version:
Microsoft.UI.Xaml.2.3.191007001-prerelease


| Windows 10 version | Saw the problem? |
| :--------------------------------- | :-------------------- |
| Insider Build (xxxxx) | Yes |
| May 2019 Update (18362) | Yes |
| October 2018 Update (17763) | |
| April 2018 Update (17134) | |
| Fall Creators Update (16299) | |
| Creators Update (15063) | |


| Device form factor | Saw the problem? |
| :-------------------- | :------------------- |
| Desktop | Yes |
| Mobile | |
| Xbox | |
| Surface Hub | |
| IoT | |

area-TabView help wanted team-Controls

All 5 comments

馃憣 Top notch sketches.

The default should not be 0. There would need to be a 40 epx minimum width so it can meet the touch target recommendation. Factor in the Close button. And then add a Tab Icon/Loading Progress Ring. and finally adding Tab Text, would all extend the width.

As for a Maximum. I think that should depend on the Tab Mode. Max width when they are all equal. No max by default when it sizes to content. (although text trimming would prevent Tab Titles becoming so unweildly as to become practically useless)

@teap @stmoy bug or spec issue? We discussed a little bit in email but didn't close.

Reverting my previous change so that sizeToContent wins.

Fixed in #1538.

Was this page helpful?
0 / 5 - 0 ratings