Skip to content

Commit

Permalink
Set HorizontalScrollBarVisibility and VerticalScrollBarVisibility for…
Browse files Browse the repository at this point in the history
… HotKeyBox and NumericUpdDown to Hidden, cause the inner TextBox has this as default too
  • Loading branch information
punker76 committed Jan 17, 2018
1 parent 4046975 commit 4253d89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/MahApps.Metro/MahApps.Metro/Themes/HotKeyBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
<Setter Property="MinHeight" Value="26" />
<Setter Property="Padding" Value="0" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
Expand Down Expand Up @@ -48,10 +50,12 @@
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
IsTabStop="{TemplateBinding IsTabStop}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Text="{TemplateBinding Text}"
Validation.ErrorTemplate="{TemplateBinding Validation.ErrorTemplate}" />
Validation.ErrorTemplate="{TemplateBinding Validation.ErrorTemplate}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" />
<ControlTemplate.Triggers>
<Trigger Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal">
<Setter TargetName="PART_TextBox" Property="Text" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Text, Mode=OneWay}" />
Expand Down
4 changes: 2 additions & 2 deletions src/MahApps.Metro/MahApps.Metro/Themes/NumericUpDown.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<Setter Property="MinHeight" Value="26" />
<Setter Property="MinWidth" Value="62" />
<Setter Property="Padding" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
Expand Down

0 comments on commit 4253d89

Please sign in to comment.