Skip to content

Commit 3c3f78c

Browse files
authored
Merge pull request #63 from MaterialDesignInXAML/master
Update
2 parents b9e9f99 + 3b30b20 commit 3c3f78c

43 files changed

Lines changed: 497 additions & 235 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr_verification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
contents: write
3030

3131
steps:
32-
- uses: fastify/github-action-merge-dependabot@v3.11.0
32+
- uses: fastify/github-action-merge-dependabot@v3.11.1

src/MainDemo.Wpf/Drawers.xaml

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,55 @@
1010
d:DesignWidth="1080"
1111
mc:Ignorable="d">
1212
<DockPanel>
13-
<TextBlock DockPanel.Dock="Top" Style="{StaticResource PageTitleTextBlock}" Text="Drawer" />
13+
<TextBlock DockPanel.Dock="Top"
14+
Style="{StaticResource PageTitleTextBlock}"
15+
Text="Drawer" />
16+
17+
<StackPanel DockPanel.Dock="Left">
18+
19+
<StackPanel Orientation="Horizontal">
20+
<TextBlock VerticalAlignment="Center" Text="Black Overlay Background" />
21+
<ToggleButton x:Name="BackgroundToggle" Margin="8,0,16,0" />
22+
<TextBlock VerticalAlignment="Center" Text="Primary Overlay Background" />
23+
</StackPanel>
24+
25+
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
26+
<TextBlock VerticalAlignment="Center" Text="Open Mode" />
27+
<ComboBox SelectedValue="{Binding OpenMode, ElementName=DrawerHost}" SelectedValuePath="Content">
28+
<ComboBoxItem Content="{x:Static materialDesign:DrawerHostOpenMode.Modal}" />
29+
<ComboBoxItem Content="{x:Static materialDesign:DrawerHostOpenMode.Standard}" />
30+
</ComboBox>
31+
</StackPanel>
32+
33+
<StackPanel Margin="0,8,0,0">
34+
35+
<CheckBox x:Name="cbApplyBlurBackground" Content="ApplyBlurBackground" />
36+
37+
<DockPanel>
38+
<Button Click="Drawer_ResetBlur"
39+
Content="{materialDesign:PackIcon Kind=Reload}"
40+
DockPanel.Dock="Right"
41+
Style="{StaticResource MaterialDesignFlatButton}"
42+
ToolTip="Reset the BlurRadius of the Drawers Background to it's default value" />
43+
<Slider x:Name="BlurRadiusSlider"
44+
DockPanel.Dock="Left"
45+
Maximum="64"
46+
Minimum="1"
47+
Style="{StaticResource MaterialDesignDiscreteSlider}" />
48+
</DockPanel>
49+
</StackPanel>
1450

15-
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
16-
<TextBlock VerticalAlignment="Center" Text="Black Overlay Background" />
17-
18-
<ToggleButton x:Name="BackgroundToggle" Margin="8,0,16,0" />
19-
20-
<TextBlock VerticalAlignment="Center" Text="Primary Overlay Background" />
21-
22-
<TextBlock Margin="30,0,16,0"
23-
VerticalAlignment="Center"
24-
Text="Open Mode" />
25-
<ComboBox SelectedValue="{Binding OpenMode, ElementName=DrawerHost}" SelectedValuePath="Content">
26-
<ComboBoxItem Content="{x:Static materialDesign:DrawerHostOpenMode.Modal}" />
27-
<ComboBoxItem Content="{x:Static materialDesign:DrawerHostOpenMode.Standard}" />
28-
</ComboBox>
2951
</StackPanel>
3052

31-
<smtx:XamlDisplay MaxHeight="{x:Static system:Double.MaxValue}" UniqueKey="drawers_1">
53+
<smtx:XamlDisplay MaxHeight="{x:Static system:Double.MaxValue}"
54+
DockPanel.Dock="Left"
55+
UniqueKey="drawers_1">
3256
<materialDesign:DrawerHost x:Name="DrawerHost"
3357
Width="480"
3458
Height="480"
3559
Margin="32"
60+
ApplyBlurBackground="{Binding ElementName=cbApplyBlurBackground, Path=IsChecked}"
61+
BlurRadius="{Binding ElementName=BlurRadiusSlider, Path=Value}"
3662
HorizontalAlignment="Center"
3763
VerticalAlignment="Center"
3864
BorderBrush="{DynamicResource MaterialDesignDivider}"

src/MainDemo.Wpf/Drawers.xaml.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
namespace MaterialDesignDemo;
1+
using MaterialDesignThemes.Wpf;
2+
3+
namespace MaterialDesignDemo;
24

35
public partial class Drawers
46
{
5-
public Drawers() => InitializeComponent();
7+
public Drawers()
8+
{
9+
InitializeComponent();
10+
Drawer_ResetBlur(null!, null!);
11+
}
12+
13+
private void Drawer_ResetBlur(object sender, RoutedEventArgs e)
14+
{
15+
BlurRadiusSlider.Value = DrawerHost.DefaultBlurRadius;
16+
}
617
}

src/MaterialDesign3.Demo.Wpf/App.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<materialDesign:PackIcon Margin="3"
6969
Background="Transparent"
7070
Cursor="Hand"
71-
Foreground="{DynamicResource PrimaryHueDarkBrush}"
71+
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
7272
Kind="Xml"
7373
ToolTip="View XAML">
7474
<materialDesign:PackIcon.Style>
@@ -101,7 +101,7 @@
101101
<Grid>
102102
<AdornerDecorator>
103103
<Border Margin="-5"
104-
BorderBrush="{DynamicResource SecondaryHueMidBrush}"
104+
BorderBrush="{DynamicResource MaterialDesign.Brush.Secondary}"
105105
Opacity=".4">
106106
<Border.Style>
107107
<Style TargetType="Border">
@@ -136,7 +136,7 @@
136136
<Style TargetType="Rectangle" x:Key="PageSectionSeparator">
137137
<Setter Property="Margin" Value="0,24" />
138138
<Setter Property="Height" Value="1" />
139-
<Setter Property="Fill" Value="{DynamicResource MaterialDesignDivider}" />
139+
<Setter Property="Fill" Value="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
140140
</Style>
141141

142142
</ResourceDictionary>

src/MaterialDesign3.Demo.Wpf/Buttons.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@
503503
</smtx:XamlDisplay>
504504

505505
<smtx:XamlDisplay UniqueKey="buttons_254">
506-
<Button Background="{DynamicResource MaterialDesignTextFieldBoxBackground}"
506+
<Button Background="{DynamicResource MaterialDesign.Brush.TextBox.FilledBackground}"
507507
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
508508
Style="{StaticResource MaterialDesignIconButton}"
509509
ToolTip="MaterialDesignIconButton">
@@ -518,7 +518,7 @@
518518
<Rectangle Grid.Row="2"
519519
Height="1"
520520
Margin="0,24,0,0"
521-
Fill="{DynamicResource MaterialDesignDivider}" />
521+
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
522522

523523
<TextBlock Grid.Row="3"
524524
Margin="0,24"
@@ -584,7 +584,7 @@
584584
<Rectangle Grid.Row="5"
585585
Height="1"
586586
Margin="0,24,0,0"
587-
Fill="{DynamicResource MaterialDesignDivider}" />
587+
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
588588

589589
<TextBlock Grid.Row="6"
590590
Margin="0,24"
@@ -786,7 +786,7 @@
786786
<Rectangle Grid.Row="8"
787787
Height="1"
788788
Margin="0,24,0,0"
789-
Fill="{DynamicResource MaterialDesignDivider}" />
789+
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
790790

791791
<TextBlock Grid.Row="9"
792792
Margin="0,24"
@@ -941,7 +941,7 @@
941941
<Rectangle Grid.Row="11"
942942
Height="1"
943943
Margin="0,24,0,0"
944-
Fill="{DynamicResource MaterialDesignDivider}" />
944+
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
945945

946946
<TextBlock Grid.Row="12"
947947
Margin="0,24"

src/MaterialDesign3.Demo.Wpf/Cards.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
<materialDesign:Card Width="200"
176176
Padding="0"
177177
Background="#03a9f4"
178-
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
178+
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}">
179179
<Grid>
180180
<Grid.RowDefinitions>
181181
<RowDefinition Height="Auto" />
@@ -222,17 +222,17 @@
222222
UniqueKey="cards_4">
223223
<materialDesign:Card Width="200"
224224
Padding="8"
225-
Background="{DynamicResource PrimaryHueLightBrush}"
226-
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}">
225+
Background="{DynamicResource MaterialDesign.Brush.Primary.Light}"
226+
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Light.Foreground}">
227227
<TextBlock FontSize="16" Text="Boring Text" />
228228
</materialDesign:Card>
229229
</smtx:XamlDisplay>
230230

231231
<smtx:XamlDisplay Margin="4,4,0,16" UniqueKey="cards_5">
232232
<materialDesign:Card Width="200"
233233
Padding="8"
234-
Background="{DynamicResource PrimaryHueDarkBrush}"
235-
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
234+
Background="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
235+
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}"
236236
UniformCornerRadius="6">
237237
<TextBlock Text="You can adjust the corner radius" TextWrapping="Wrap" />
238238
</materialDesign:Card>
@@ -244,8 +244,8 @@
244244
UniqueKey="cards_6">
245245
<materialDesign:Card Width="200"
246246
Padding="8"
247-
Background="{DynamicResource PrimaryHueDarkBrush}"
248-
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}">
247+
Background="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
248+
Foreground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}">
249249
<StackPanel>
250250
<TextBlock Margin="16,16,12,8"
251251
FontSize="16"

src/MaterialDesign3.Demo.Wpf/Chips.xaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555

5656
<smtx:XamlDisplay Margin="0,0,4,4" UniqueKey="chips_5">
5757
<materialDesign:Chip Content="Twitter"
58-
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
59-
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}">
58+
IconBackground="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
59+
IconForeground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}">
6060
<materialDesign:Chip.Icon>
6161
<materialDesign:PackIcon Kind="Twitter" />
6262
</materialDesign:Chip.Icon>
@@ -93,8 +93,8 @@
9393
<smtx:XamlDisplay Margin="0,0,4,4" UniqueKey="chips_9">
9494
<materialDesign:Chip Content="ZNA Inc"
9595
Icon="Z"
96-
IconBackground="{DynamicResource PrimaryHueLightBrush}"
97-
IconForeground="{DynamicResource PrimaryHueLightForegroundBrush}"
96+
IconBackground="{DynamicResource MaterialDesign.Brush.Primary.Light}"
97+
IconForeground="{DynamicResource MaterialDesign.Brush.Primary.Light.Foreground}"
9898
IsDeletable="True" />
9999
</smtx:XamlDisplay>
100100
</WrapPanel>
@@ -126,8 +126,8 @@
126126

127127
<smtx:XamlDisplay Margin="0,0,4,4" UniqueKey="chips_38">
128128
<materialDesign:Chip Content="Twitter"
129-
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
130-
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
129+
IconBackground="{DynamicResource MaterialDesign.Brush.Primary.Dark}"
130+
IconForeground="{DynamicResource MaterialDesign.Brush.Primary.Dark.Foreground}"
131131
Style="{StaticResource MaterialDesignOutlineChip}">
132132
<materialDesign:Chip.Icon>
133133
<materialDesign:PackIcon Kind="Twitter" />
@@ -140,7 +140,7 @@
140140
<StackPanel Grid.Row="2">
141141
<Rectangle Height="1"
142142
Margin="0,24,0,0"
143-
Fill="{DynamicResource MaterialDesignDivider}" />
143+
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
144144
<TextBlock Style="{StaticResource ChipsHeadline}" Text="Filter Chips" />
145145
</StackPanel>
146146

@@ -257,7 +257,7 @@
257257
<StackPanel Grid.Row="4">
258258
<Rectangle Height="1"
259259
Margin="0,24,0,0"
260-
Fill="{DynamicResource MaterialDesignDivider}" />
260+
Fill="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" />
261261
<TextBlock Style="{StaticResource ChipsHeadline}" Text="Choice Chips" />
262262
</StackPanel>
263263

0 commit comments

Comments
 (0)