Describe the bug
I was trying to remove the inherent padding around the TabViewItems:

I figured modifying the Padding value of the TabView itself should adjust this behavior... it does not. ☹
This is modified instead by having to modify the TabViewHeaderPadding resource.
Solution
It looks like the intent was to allow it to modify the padding of the control in the style here in TabView:
|
<Setter Property="Padding" Value="{ThemeResource TabViewHeaderPadding}" /> |
However, it was used directly again in the TabViewListView style:
|
<Style TargetType="primitives:TabViewListView"> |
|
<Setter Property="VerticalAlignment" Value="Top" /> |
|
<Setter Property="Padding" Value="{ThemeResource TabViewHeaderPadding}" /> |
It should have been instead exposed and template bound to the main TabView control property when the TabViewListView is used here:
|
<primitives:TabViewListView |
|
Grid.Column="1" |
|
x:Name="TabListView" |
|
CanReorderItems="{TemplateBinding CanReorderTabs}" |
|
CanDragItems="{TemplateBinding CanDragTabs}" |
|
AllowDrop="{TemplateBinding AllowDropTabs}" |
|
ItemsSource="{TemplateBinding TabItemsSource}" |
|
ItemTemplate="{TemplateBinding TabItemTemplate}" |
|
ItemTemplateSelector="{TemplateBinding TabItemTemplateSelector}"/> |
This should be an easy resolution to make it easier for devs to customize the style of the control.
Describe the bug
I was trying to remove the inherent padding around the TabViewItems:
I figured modifying the
Paddingvalue of theTabViewitself should adjust this behavior... it does not. ☹This is modified instead by having to modify the
TabViewHeaderPaddingresource.Solution
It looks like the intent was to allow it to modify the padding of the control in the style here in
TabView:microsoft-ui-xaml/dev/TabView/TabView.xaml
Line 16 in c6c8d08
However, it was used directly again in the
TabViewListViewstyle:microsoft-ui-xaml/dev/TabView/TabView.xaml
Lines 99 to 101 in c6c8d08
It should have been instead exposed and template bound to the main TabView control property when the
TabViewListViewis used here:microsoft-ui-xaml/dev/TabView/TabView.xaml
Lines 50 to 58 in c6c8d08
This should be an easy resolution to make it easier for devs to customize the style of the control.