Skip to content

Commit 97e6ee2

Browse files
committed
scrollbars
1 parent d4eb505 commit 97e6ee2

File tree

4 files changed

+257
-13
lines changed

4 files changed

+257
-13
lines changed

MaterialDesignColors.WpfExample/ProvingGround.xaml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
7-
xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
8-
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
96
x:Class="MaterialDesignColors.WpfExample.ProvingGround"
7+
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
8+
Background="{DynamicResource MaterialDesignPaper}"
109
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
1110
mc:Ignorable="d"
12-
Background="{DynamicResource MaterialDesignPaper}" d:DesignWidth="340" d:DesignHeight="635">
11+
d:DesignWidth="340" d:DesignHeight="635">
1312
<UserControl.Resources>
1413
<ResourceDictionary>
1514
<ResourceDictionary.MergedDictionaries>
@@ -49,17 +48,35 @@
4948
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="{StaticResource Accent700Foreground}"/>
5049
</ResourceDictionary>
5150
</ResourceDictionary.MergedDictionaries>
51+
5252

5353
</ResourceDictionary>
5454

5555
</UserControl.Resources>
5656

57-
<!--
58-
<wpf:ListSortDirectionIndicator Width="24" Height="24" Style="{DynamicResource MaterialDesignListSortDirectionIndicator}" ListSortDirection="Descending" />
59-
-->
60-
<DataGrid ItemsSource="{Binding Items}" CanUserAddRows="False" CanUserSortColumns="True">
61-
62-
</DataGrid>
63-
64-
57+
<Grid>
58+
<Grid.ColumnDefinitions>
59+
<ColumnDefinition Width="1*" />
60+
<ColumnDefinition Width="1*" />
61+
</Grid.ColumnDefinitions>
62+
<ScrollBar Orientation="Vertical" Style="{DynamicResource MaterialDesignScrollBar}"
63+
Grid.Column="0"
64+
HorizontalAlignment="Left"
65+
/>
66+
<ScrollBar Orientation="Vertical" Style="{DynamicResource MaterialDesignScrollBar}"
67+
IsEnabled="False"
68+
Grid.Column="0"
69+
HorizontalAlignment="Right"
70+
/>
71+
<ScrollBar Orientation="Horizontal" Style="{DynamicResource MaterialDesignScrollBar}"
72+
Grid.Column="1"
73+
VerticalAlignment="Top"
74+
/>
75+
<ScrollBar Orientation="Horizontal" Style="{DynamicResource MaterialDesignScrollBar}"
76+
IsEnabled="False"
77+
Grid.Column="1"
78+
VerticalAlignment="Bottom"
79+
/>
80+
</Grid>
81+
6582
</UserControl>

MaterialDesignThemes.Wpf/MaterialDesignThemes.Wpf.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
<SubType>Designer</SubType>
105105
<Generator>MSBuild:Compile</Generator>
106106
</Page>
107+
<Page Include="Themes\MaterialDesignTheme.ScrollBar.xaml">
108+
<SubType>Designer</SubType>
109+
<Generator>MSBuild:Compile</Generator>
110+
</Page>
107111
<Page Include="Themes\MaterialDesignTheme.Shadows.xaml">
108112
<SubType>Designer</SubType>
109113
<Generator>MSBuild:Compile</Generator>

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Defaults.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Menu.xaml" />
1616
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PasswordBox.xaml" />
1717
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml" />
18+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ScrollBar.xaml" />
1819
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.slider.xaml" />
1920
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.textbox.xaml" />
2021
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.togglebutton.xaml" />
@@ -34,7 +35,8 @@
3435
<Style TargetType="{x:Type DatePicker}" BasedOn="{StaticResource MaterialDesignDatePicker}" />
3536
<Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource MaterialDesignListBox}" />
3637
<Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource MaterialDesignPasswordBox}" />
37-
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource MaterialDesignRadioButton}" />
38+
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource MaterialDesignRadioButton}" />
39+
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource MaterialDesignScrollBar}" />
3840
<Style TargetType="{x:Type Slider}" BasedOn="{StaticResource MaterialDesignSlider}" />
3941
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource MaterialDesignTextBox}" />
4042
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource MaterialDesignSwitchToggleButton}" />

0 commit comments

Comments
 (0)