[UWP] Fix MDP Button "Padding" issue (#8610)

* Update MasterDetailControlStyle.xaml

* Added comments

* Update MasterDetailControlStyle.xaml
This commit is contained in:
Gerald Versluis 2019-11-22 04:04:10 +01:00 коммит произвёл E.Z. Hart
Родитель af2d3f029f
Коммит 2188232bc4
2 изменённых файлов: 21 добавлений и 1 удалений

Просмотреть файл

@ -35,7 +35,26 @@
<Border x:Name="TopCommandBarArea" HorizontalAlignment="Stretch" Background="{TemplateBinding ToolbarBackground}">
<uwp:FormsCommandBar x:Name="CommandBar" Background="{TemplateBinding ToolbarBackground}" MinHeight="{ThemeResource TitleBarHeight}" HorizontalAlignment="Stretch">
<uwp:FormsCommandBar.Content>
<uwp:FormsCommandBar.Resources>
<Thickness x:Key="AppBarButtonContentViewboxMargin">12,14,0,14</Thickness>
<Thickness x:Key="AppBarButtonContentViewboxCompactMargin">0,14,0,14</Thickness>
<Thickness x:Key="AppBarButtonContentViewboxCollapsedMargin">0,14,0,4</Thickness>
<Thickness x:Key="AppBarButtonOverflowTextTouchMargin">0,11,0,13</Thickness>
<Thickness x:Key="AppBarButtonOverflowTextLabelPadding">0,5,0,7</Thickness>
<Thickness x:Key="AppBarButtonTextLabelMargin">2,0,2,8</Thickness>
<Thickness x:Key="AppBarButtonTextLabelOnRightMargin">8,15,12,17</Thickness>
<Thickness x:Key="AppBarToggleButtonOverflowTextTouchMargin">0,11,0,13</Thickness>
<Thickness x:Key="AppBarToggleButtonOverflowCheckTouchMargin">12,12,12,12</Thickness>
<Thickness x:Key="AppBarToggleButtonOverflowCheckMargin">12,6,12,6</Thickness>
<Thickness x:Key="AppBarToggleButtonTextLabelMargin">2,0,2,8</Thickness>
<Thickness x:Key="AppBarToggleButtonTextLabelOnRightMargin">8,15,12,17</Thickness>
<Thickness x:Key="AppBarToggleButtonOverflowTextLabelPadding">0,5,0,7</Thickness>
<x:Double x:Key="AppBarButtonContentHeight">20</x:Double>
<x:Double x:Key="AppBarThemeMinHeight">60</x:Double>
<!-- We probably want to keep this in sync with TitleBarHeight in Resources.xaml -->
<x:Double x:Key="AppBarThemeCompactHeight">48</x:Double>
</uwp:FormsCommandBar.Resources>
<uwp:FormsCommandBar.Content>
<Border x:Name="TitleArea" Height="{ThemeResource TitleBarHeight}" Visibility="{TemplateBinding DetailTitleVisibility}" HorizontalAlignment="Stretch">
<Grid x:Name="TitleViewPresenter" VerticalAlignment="Center" Background="{TemplateBinding ToolbarBackground}" HorizontalAlignment="Stretch">

Просмотреть файл

@ -34,6 +34,7 @@
<uwp:KeyboardConverter x:Key="KeyboardConverter" />
<uwp:MasterBackgroundConverter x:Key="MasterBackgroundConverter" />
<uwp:ImageSourceIconElementConverter x:Key="ImageSourceIconElementConverter" />
<!-- We probably want to keep this in sync with AppBarThemeCompactHeight in MasterDetailControlStyle.xaml (in uwp:FormsCommandBar.Resources) -->
<x:Double x:Key="TitleBarHeight">48</x:Double>
<DataTemplate x:Key="PushPinTemplate">