Skip to content

Commit bc06dca

Browse files
committed
Merge branch 'master' of https://github.com/FrTerstappen/MaterialDesignInXamlToolkit into FrTerstappen-master
2 parents 76ca3ac + add576a commit bc06dca

File tree

5 files changed

+291
-58
lines changed

5 files changed

+291
-58
lines changed

MainDemo.Wpf/Typography.xaml

Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,81 @@
11
<UserControl x:Class="MaterialDesignColors.WpfExample.Typography"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
mc:Ignorable="d"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
mc:Ignorable="d"
77
d:DesignHeight="300" d:DesignWidth="300">
88
<UserControl.Resources>
99
<Style TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignCaptionTextBlock}">
1010
<Setter Property="Opacity" Value=".68"></Setter>
1111
</Style>
1212
</UserControl.Resources>
13-
14-
<Grid Margin="32">
15-
<Grid.ColumnDefinitions>
16-
<ColumnDefinition Width="Auto" />
17-
<ColumnDefinition Width="64" />
18-
<ColumnDefinition Width="Auto" />
19-
</Grid.ColumnDefinitions>
20-
<Grid.RowDefinitions>
21-
<RowDefinition Height="Auto" />
22-
<RowDefinition Height="Auto" />
23-
<RowDefinition Height="Auto" />
24-
<RowDefinition Height="Auto" />
25-
<RowDefinition Height="Auto" />
26-
<RowDefinition Height="Auto" />
27-
<RowDefinition Height="Auto" />
28-
<RowDefinition Height="Auto" />
29-
<RowDefinition Height="Auto" />
30-
<RowDefinition Height="Auto" />
31-
<RowDefinition Height="Auto" />
32-
</Grid.RowDefinitions>
33-
<TextBlock Grid.Row="0" Grid.Column="0" Margin="0 26 0 0">Display 4 - MaterialDesignDisplay4TextBlock</TextBlock>
34-
<TextBlock Grid.Row="0" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay4TextBlock}" Margin="0 4 0 4">Light 112sp</TextBlock>
13+
<ScrollViewer HorizontalScrollBarVisibility="Auto"
14+
VerticalScrollBarVisibility="Disabled">
15+
<Grid Margin="32">
16+
<Grid.ColumnDefinitions>
17+
<ColumnDefinition Width="Auto" />
18+
<ColumnDefinition Width="64" />
19+
<ColumnDefinition Width="Auto" />
20+
<ColumnDefinition Width="64" />
21+
<ColumnDefinition Width="Auto" />
22+
</Grid.ColumnDefinitions>
23+
<Grid.RowDefinitions>
24+
<RowDefinition Height="Auto" />
25+
<RowDefinition Height="Auto" />
26+
<RowDefinition Height="Auto" />
27+
<RowDefinition Height="Auto" />
28+
<RowDefinition Height="Auto" />
29+
<RowDefinition Height="Auto" />
30+
<RowDefinition Height="Auto" />
31+
<RowDefinition Height="Auto" />
32+
<RowDefinition Height="Auto" />
33+
<RowDefinition Height="Auto" />
34+
<RowDefinition Height="Auto" />
35+
</Grid.RowDefinitions>
36+
<TextBlock Grid.Row="0" Grid.Column="0" Margin="0 26 0 0">Display 4 - MaterialDesignDisplay4TextBlock</TextBlock>
37+
<TextBlock Grid.Row="0" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay4TextBlock}" Margin="0 4 0 4">Light 112sp</TextBlock>
38+
<TextBlock Grid.Row="0" Grid.Column="4" Margin="0 4 0 4"><Hyperlink IsEnabled="False" Style="{StaticResource MaterialDesignDisplay4Hyperlink}">Light 112sp (Disabled)</Hyperlink></TextBlock>
3539

36-
<TextBlock Grid.Row="1" Grid.Column="0" Margin="0 12 0 0">Display 3 - MaterialDesignDisplay3TextBlock</TextBlock>
37-
<TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay3TextBlock}" Margin="0 4 0 4">Regular 56sp</TextBlock>
40+
<TextBlock Grid.Row="1" Grid.Column="0" Margin="0 12 0 0">Display 3 - MaterialDesignDisplay3TextBlock</TextBlock>
41+
<TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay3TextBlock}" Margin="0 4 0 4">Regular 56sp</TextBlock>
42+
<TextBlock Grid.Row="1" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignDisplay3Hyperlink}">Regular 56sp</Hyperlink></TextBlock>
3843

39-
<TextBlock Grid.Row="2" Grid.Column="0" Margin="0 8 0 0">Display 2 - MaterialDesignDisplay2TextBlock</TextBlock>
40-
<TextBlock Grid.Row="2" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay2TextBlock}" Margin="0 4 0 4">Regular 45sp</TextBlock>
44+
<TextBlock Grid.Row="2" Grid.Column="0" Margin="0 8 0 0">Display 2 - MaterialDesignDisplay2TextBlock</TextBlock>
45+
<TextBlock Grid.Row="2" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay2TextBlock}" Margin="0 4 0 4">Regular 45sp</TextBlock>
46+
<TextBlock Grid.Row="2" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignDisplay2Hyperlink}">Regular 45sp</Hyperlink></TextBlock>
4147

42-
<TextBlock Grid.Row="3" Grid.Column="0" Margin="0 8 0 0">Display 1 - MaterialDesignDisplay1TextBlock</TextBlock>
43-
<TextBlock Grid.Row="3" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay1TextBlock}" Margin="0 4 0 4">Regular 34sp</TextBlock>
48+
<TextBlock Grid.Row="3" Grid.Column="0" Margin="0 8 0 0">Display 1 - MaterialDesignDisplay1TextBlock</TextBlock>
49+
<TextBlock Grid.Row="3" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay1TextBlock}" Margin="0 4 0 4">Regular 34sp</TextBlock>
50+
<TextBlock Grid.Row="3" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignDisplay1Hyperlink}">Regular 34sp</Hyperlink></TextBlock>
4451

45-
<TextBlock Grid.Row="4" Grid.Column="0" Margin="0 8 0 0">Headline - MaterialDesignHeadlineTextBlock</TextBlock>
46-
<TextBlock Grid.Row="4" Grid.Column="2" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="0 4 0 6">Regular 24sp</TextBlock>
52+
<TextBlock Grid.Row="4" Grid.Column="0" Margin="0 8 0 0">Headline - MaterialDesignHeadlineTextBlock</TextBlock>
53+
<TextBlock Grid.Row="4" Grid.Column="2" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="0 4 0 6">Regular 24sp</TextBlock>
54+
<TextBlock Grid.Row="4" Grid.Column="4" Margin="0 4 0 4"><Hyperlink IsEnabled="False" Style="{StaticResource MaterialDesignHeadlineHyperlink}">Regular 24sp (Disabled)</Hyperlink></TextBlock>
4755

48-
<TextBlock Grid.Row="5" Grid.Column="0" Margin="0 8 0 0">Title - MaterialDesignTitleTextBlock</TextBlock>
49-
<TextBlock Grid.Row="5" Grid.Column="2" Style="{StaticResource MaterialDesignTitleTextBlock}" Margin="0 6 0 8">Medium 20sp</TextBlock>
56+
<TextBlock Grid.Row="5" Grid.Column="0" Margin="0 8 0 0">Title - MaterialDesignTitleTextBlock</TextBlock>
57+
<TextBlock Grid.Row="5" Grid.Column="2" Style="{StaticResource MaterialDesignTitleTextBlock}" Margin="0 6 0 8">Medium 20sp</TextBlock>
58+
<TextBlock Grid.Row="5" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignTitleHyperlink}">Medium 20sp</Hyperlink></TextBlock>
5059

51-
<TextBlock Grid.Row="6" Grid.Column="0" VerticalAlignment="Center">Subheading - MaterialDesignSubheadingTextBlock</TextBlock>
52-
<TextBlock Grid.Row="6" Grid.Column="2" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Margin="0 8 0 8">Regular 15sp</TextBlock>
60+
<TextBlock Grid.Row="6" Grid.Column="0" VerticalAlignment="Center">Subheading - MaterialDesignSubheadingTextBlock</TextBlock>
61+
<TextBlock Grid.Row="6" Grid.Column="2" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Margin="0 8 0 8">Regular 15sp</TextBlock>
62+
<TextBlock Grid.Row="6" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignSubheadingHyperlink}">Regular 15sp</Hyperlink></TextBlock>
5363

54-
<TextBlock Grid.Row="7" Grid.Column="0" VerticalAlignment="Center">Body 2 - MaterialDesignBody2TextBlock</TextBlock>
55-
<TextBlock Grid.Row="7" Grid.Column="2" Style="{StaticResource MaterialDesignBody2TextBlock}" Margin="0 8 0 8">Medium 13sp</TextBlock>
64+
<TextBlock Grid.Row="7" Grid.Column="0" VerticalAlignment="Center">Body 2 - MaterialDesignBody2TextBlock</TextBlock>
65+
<TextBlock Grid.Row="7" Grid.Column="2" Style="{StaticResource MaterialDesignBody2TextBlock}" Margin="0 8 0 8">Medium 13sp</TextBlock>
66+
<TextBlock Grid.Row="7" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignBody2Hyperlink}">Medium 13sp</Hyperlink></TextBlock>
5667

57-
<TextBlock Grid.Row="8" Grid.Column="0" VerticalAlignment="Center">Body 1 - MaterialDesignBody1TextBlock</TextBlock>
58-
<TextBlock Grid.Row="8" Grid.Column="2" Style="{StaticResource MaterialDesignBody1TextBlock}" Margin="0 8 0 8">Regular 13sp</TextBlock>
68+
<TextBlock Grid.Row="8" Grid.Column="0" VerticalAlignment="Center">Body 1 - MaterialDesignBody1TextBlock</TextBlock>
69+
<TextBlock Grid.Row="8" Grid.Column="2" Style="{StaticResource MaterialDesignBody1TextBlock}" Margin="0 8 0 8">Regular 13sp</TextBlock>
70+
<TextBlock Grid.Row="8" Grid.Column="4" Margin="0 4 0 4"><Hyperlink IsEnabled="False" Style="{StaticResource MaterialDesignBody1Hyperlink}">Regular 13sp (Disabled)</Hyperlink></TextBlock>
5971

60-
<TextBlock Grid.Row="9" Grid.Column="0" VerticalAlignment="Center">Caption - MaterialDesignCaptionTextBlock</TextBlock>
61-
<TextBlock Grid.Row="9" Grid.Column="2" Style="{StaticResource MaterialDesignCaptionTextBlock}" Margin="0 8 0 8">Regular 12sp</TextBlock>
72+
<TextBlock Grid.Row="9" Grid.Column="0" VerticalAlignment="Center">Caption - MaterialDesignCaptionTextBlock</TextBlock>
73+
<TextBlock Grid.Row="9" Grid.Column="2" Style="{StaticResource MaterialDesignCaptionTextBlock}" Margin="0 8 0 8">Regular 12sp</TextBlock>
74+
<TextBlock Grid.Row="9" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignCaptionHyperlink}">Regular 12sp</Hyperlink></TextBlock>
6275

63-
<TextBlock Grid.Row="10" Grid.Column="0" VerticalAlignment="Center">Button - MaterialDesignButtonTextBlock</TextBlock>
64-
<TextBlock Grid.Row="10" Grid.Column="2" Style="{StaticResource MaterialDesignButtonTextBlock}" Margin="0 8 0 8">MEDIUM (ALL CAPS) 14sp</TextBlock>
76+
<TextBlock Grid.Row="10" Grid.Column="0" VerticalAlignment="Center">Button - MaterialDesignButtonTextBlock</TextBlock>
77+
<TextBlock Grid.Row="10" Grid.Column="2" Style="{StaticResource MaterialDesignButtonTextBlock}" Margin="0 8 0 8">MEDIUM (ALL CAPS) 14sp</TextBlock>
6578

66-
67-
68-
</Grid>
69-
</UserControl>
79+
</Grid>
80+
</ScrollViewer>
81+
</UserControl>

MaterialDesignThemes.Wpf/MaterialDesignThemes.Wpf.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@
140140
<SubType>Designer</SubType>
141141
<Generator>MSBuild:Compile</Generator>
142142
</Page>
143+
<Page Include="Themes\MaterialDesignTheme.Hyperlink.xaml">
144+
<Generator>MSBuild:Compile</Generator>
145+
<SubType>Designer</SubType>
146+
</Page>
143147
<Page Include="Themes\MaterialDesignTheme.TextBox.xaml">
144148
<SubType>Designer</SubType>
145149
<Generator>MSBuild:Compile</Generator>

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Defaults.xaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf">
4-
4+
55
<!-- use this resource dictionary to set up the most common themese for standard controls -->
66

77
<ResourceDictionary.MergedDictionaries>
@@ -14,6 +14,7 @@
1414
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Expander.xaml" />
1515
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Font.xaml" />
1616
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.GridSplitter.xaml" />
17+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Hyperlink.xaml" />
1718
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Label.xaml" />
1819
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Listbox.xaml" />
1920
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Menu.xaml" />
@@ -38,23 +39,23 @@
3839
<Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignCheckBox}" />
3940
<Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource MaterialDesignComboBox}" />
4041
<Style TargetType="{x:Type ContextMenu}" BasedOn="{StaticResource MaterialDesignContextMenu}" />
41-
<Style TargetType="{x:Type DataGrid}" BasedOn="{StaticResource MaterialDesignDataGrid}" />
42-
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource MaterialDesignDataGridCell}" />
43-
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" />
44-
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource MaterialDesignDataGridRow}" />
45-
<Style TargetType="{x:Type DataGridRowHeader}" BasedOn="{StaticResource MaterialDesignDataGridRowHeader}" />
42+
<Style TargetType="{x:Type DataGrid}" BasedOn="{StaticResource MaterialDesignDataGrid}" />
43+
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource MaterialDesignDataGridCell}" />
44+
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" />
45+
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource MaterialDesignDataGridRow}" />
46+
<Style TargetType="{x:Type DataGridRowHeader}" BasedOn="{StaticResource MaterialDesignDataGridRowHeader}" />
4647
<Style TargetType="{x:Type DatePicker}" BasedOn="{StaticResource MaterialDesignDatePicker}" />
4748
<Style TargetType="{x:Type Expander}" BasedOn="{StaticResource MaterialDesignExpander}" />
4849
<Style TargetType="{x:Type GridSplitter}" BasedOn="{StaticResource MaterialDesignGridSplitter}" />
4950
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource MaterialDesignLabel}" />
5051
<Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource MaterialDesignListBox}" />
5152
<Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource MaterialDesignPasswordBox}" />
5253
<Style TargetType="{x:Type ProgressBar}" BasedOn="{StaticResource MaterialDesignLinearProgressBar}" />
53-
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource MaterialDesignRadioButton}" />
54+
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource MaterialDesignRadioButton}" />
5455
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource MaterialDesignScrollBar}" />
5556
<Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource MaterialDesignScrollViewer}" />
5657
<Style TargetType="{x:Type Slider}" BasedOn="{StaticResource MaterialDesignSlider}" />
57-
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource MaterialDesignTextBox}" />
58+
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource MaterialDesignTextBox}" />
5859
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource MaterialDesignSwitchToggleButton}" />
5960
<Style TargetType="{x:Type ToolBar}" BasedOn="{StaticResource MaterialDesignToolBar}" />
6061
<Style TargetType="{x:Type ToolBarTray}" BasedOn="{StaticResource MaterialDesignToolBarTray}" />

0 commit comments

Comments
 (0)