fix: Fix TextBox padding, and fix NumericUpDown padding.
This commit is contained in:
parent
96a86ce372
commit
e2a121f024
@ -18,8 +18,6 @@
|
|||||||
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
|
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
MinWidth="0"
|
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
AcceptsReturn="False"
|
AcceptsReturn="False"
|
||||||
|
@ -88,12 +88,14 @@
|
|||||||
<Grid ColumnDefinitions="Auto,*,Auto, Auto, Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto, Auto, Auto">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Padding="{DynamicResource TextBoxInnerContentPadding}"
|
Padding="{DynamicResource TextBoxInnerLeftContentPadding}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding InnerLeftContent}"
|
Content="{TemplateBinding InnerLeftContent}"
|
||||||
Foreground="{DynamicResource TextBoxInnerForeground}" />
|
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||||
|
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
|
||||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||||
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
|
||||||
@ -144,10 +146,11 @@
|
|||||||
Theme="{StaticResource InputToggleButton}" />
|
Theme="{StaticResource InputToggleButton}" />
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Grid.Column="4"
|
Grid.Column="4"
|
||||||
Padding="{DynamicResource TextBoxInnerContentPadding}"
|
Padding="{DynamicResource TextBoxInnerRightContentPadding}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding InnerRightContent}"
|
Content="{TemplateBinding InnerRightContent}"
|
||||||
Foreground="{DynamicResource TextBoxInnerForeground}" />
|
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||||
|
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRightContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
@ -38,7 +38,8 @@
|
|||||||
<CornerRadius x:Key="TextBoxPrefixContentCornerRadius">0 3 3 0</CornerRadius>
|
<CornerRadius x:Key="TextBoxPrefixContentCornerRadius">0 3 3 0</CornerRadius>
|
||||||
<CornerRadius x:Key="TextBoxBothContentCornerRadius">0 0 0 0</CornerRadius>
|
<CornerRadius x:Key="TextBoxBothContentCornerRadius">0 0 0 0</CornerRadius>
|
||||||
|
|
||||||
<Thickness x:Key="TextBoxInnerContentPadding">8 0</Thickness>
|
<Thickness x:Key="TextBoxInnerLeftContentPadding">8 0 0 0</Thickness>
|
||||||
|
<Thickness x:Key="TextBoxInnerRightContentPadding">0 0 8 0</Thickness>
|
||||||
<Thickness x:Key="TextBoxContentPadding">8 0</Thickness>
|
<Thickness x:Key="TextBoxContentPadding">8 0</Thickness>
|
||||||
<Thickness x:Key="TextBoxBorderThickness">1</Thickness>
|
<Thickness x:Key="TextBoxBorderThickness">1</Thickness>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user