|
66 | 66 | --> |
67 | 67 | <Thickness x:Key="TextControlBorderThemeThickness">1</Thickness> |
68 | 68 | <Thickness x:Key="TextControlBorderThemeThicknessFocused">2</Thickness> |
69 | | - <Thickness x:Key="TextControlThemePadding">10,8,10,7</Thickness> |
| 69 | + <Thickness x:Key="TextControlThemePadding">10,5,10,6</Thickness> |
70 | 70 | <system:Double x:Key="ContentControlFontSize">14</system:Double> |
71 | 71 | <system:Double x:Key="TextControlThemeMinHeight">24</system:Double> |
72 | 72 | <system:Double x:Key="TextControlThemeMinWidth">0</system:Double> |
|
4113 | 4113 | <Thickness x:Key="TextBoxClearButtonPadding">0,0,0,0</Thickness> |
4114 | 4114 | <system:Double x:Key="TextBoxClearButtonHeight">24</system:Double> |
4115 | 4115 | <system:String x:Key="ClearGlyph"></system:String> |
4116 | | - <Style x:Key="DefaultTextBoxScrollViewerStyle" TargetType="{x:Type ScrollViewer}"> |
4117 | | - <Setter Property="Margin" Value="0" /> |
4118 | | - <Setter Property="Padding" Value="0" /> |
4119 | | - <Setter Property="SnapsToDevicePixels" Value="True" /> |
4120 | | - <Setter Property="OverridesDefaultStyle" Value="True" /> |
4121 | | - <Setter Property="Template"> |
4122 | | - <Setter.Value> |
4123 | | - <ControlTemplate TargetType="{x:Type ScrollViewer}"> |
4124 | | - <Grid> |
4125 | | - <ScrollContentPresenter Margin="0" CanContentScroll="{TemplateBinding CanContentScroll}" /> |
4126 | | - </Grid> |
4127 | | - </ControlTemplate> |
4128 | | - </Setter.Value> |
4129 | | - </Setter> |
4130 | | - </Style> |
4131 | 4116 | <Style x:Key="DefaultTextBoxBaseStyle" TargetType="{x:Type TextBoxBase}"> |
4132 | 4117 | <!-- Universal WPF UI focus --> |
4133 | 4118 | <Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
|
4158 | 4143 | <ControlTemplate TargetType="{x:Type TextBoxBase}"> |
4159 | 4144 | <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"> |
4160 | 4145 | <Border x:Name="ContentBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Padding="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding Border.CornerRadius}"> |
4161 | | - <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
4162 | | - <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" IsTabStop="{TemplateBinding ScrollViewer.IsTabStop}" Style="{StaticResource DefaultTextBoxScrollViewerStyle}" TextElement.Foreground="{TemplateBinding Foreground}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" /> |
| 4146 | + <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
| 4147 | + <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" IsTabStop="{TemplateBinding ScrollViewer.IsTabStop}" Padding="{TemplateBinding Padding}" TextElement.Foreground="{TemplateBinding Foreground}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" /> |
4163 | 4148 | </Grid> |
4164 | 4149 | </Border> |
4165 | 4150 | <!-- The Accent Border is a separate element so that changes to the border thickness do not affect the position of the element --> |
|
4201 | 4186 | <ColumnDefinition Width="*" /> |
4202 | 4187 | <ColumnDefinition Width="Auto" /> |
4203 | 4188 | </Grid.ColumnDefinitions> |
4204 | | - <Grid Grid.Column="0" Margin="{TemplateBinding Padding}"> |
4205 | | - <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" IsTabStop="{TemplateBinding ScrollViewer.IsTabStop}" Style="{StaticResource DefaultTextBoxScrollViewerStyle}" TextElement.Foreground="{TemplateBinding Foreground}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" /> |
| 4189 | + <Grid Grid.Column="0"> |
| 4190 | + <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" IsTabStop="{TemplateBinding ScrollViewer.IsTabStop}" Padding="{TemplateBinding Padding}" TextElement.Foreground="{TemplateBinding Foreground}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" /> |
4206 | 4191 | </Grid> |
4207 | 4192 | <!-- Buttons and Icons have no padding from the main element to allow absolute positions if height is larger than the text entry zone --> |
4208 | 4193 | <Button x:Name="ClearButton" Grid.Column="1" MinWidth="{StaticResource TextBoxClearButtonHeight}" MinHeight="{StaticResource TextBoxClearButtonHeight}" Margin="{StaticResource TextBoxClearButtonMargin}" Padding="{StaticResource TextBoxClearButtonPadding}" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="Transparent" BorderBrush="Transparent" Command="{Binding Path=TemplateButtonCommand, RelativeSource={RelativeSource TemplatedParent}}" Cursor="Arrow" IsTabStop="False" Foreground="{DynamicResource TextControlButtonForeground}"> |
|
0 commit comments