Skip to content

Commit ffeea1d

Browse files
committed
use new namespace in demo
1 parent c5aa096 commit ffeea1d

13 files changed

+124
-133
lines changed

MainDemo.Wpf/Buttons.xaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
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:local="clr-namespace:MaterialDesignColors.WpfExample"
7-
xmlns:wpfExample="clr-namespace:MaterialDesignColors.WpfExample"
8-
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
96
xmlns:system="clr-namespace:System;assembly=mscorlib"
7+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
108
mc:Ignorable="d"
119
d:DesignHeight="300" d:DesignWidth="300">
1210
<UserControl.Resources>
@@ -155,10 +153,10 @@
155153
</StackPanel>
156154
<TextBlock Margin="0 24 0 0" Grid.Row="9">Rating bar</TextBlock>
157155
<StackPanel Grid.Row="10" Margin="0 16 0 0" Orientation="Horizontal">
158-
<wpf:RatingBar Value="3" x:Name="BasicRatingBar" />
156+
<materialDesign:RatingBar Value="3" x:Name="BasicRatingBar" />
159157
<TextBlock Text="{Binding ElementName=BasicRatingBar, Path=Value, StringFormat=Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" />
160-
<wpf:RatingBar x:Name="CustomRatingBar" Max="3" Value="2" Margin="24 0 0 0" Orientation="Vertical">
161-
<wpf:RatingBar.ValueItemTemplate>
158+
<materialDesign:RatingBar x:Name="CustomRatingBar" Max="3" Value="2" Margin="24 0 0 0" Orientation="Vertical">
159+
<materialDesign:RatingBar.ValueItemTemplate>
162160
<DataTemplate DataType="system:Int32">
163161
<Grid>
164162
<Viewbox Width="24" Height="24">
@@ -172,8 +170,8 @@
172170
Foreground="{DynamicResource PrimaryHueMidForegroundBrush}"/>
173171
</Grid>
174172
</DataTemplate>
175-
</wpf:RatingBar.ValueItemTemplate>
176-
</wpf:RatingBar>
173+
</materialDesign:RatingBar.ValueItemTemplate>
174+
</materialDesign:RatingBar>
177175
<TextBlock Text="{Binding ElementName=CustomRatingBar, Path=Value, StringFormat=Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" />
178176
</StackPanel>
179177
</Grid>

MainDemo.Wpf/Cards.xaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:MaterialDesignColors.WpfExample"
7-
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
87
mc:Ignorable="d"
98
d:DesignHeight="300" d:DesignWidth="300">
109
<UserControl.Resources>
@@ -16,7 +15,7 @@
1615
</ResourceDictionary>
1716
</UserControl.Resources>
1817
<WrapPanel Margin="0 0 8 8" ItemWidth="200">
19-
<wpf:Card Margin="4 4 0 0">
18+
<materialDesign:Card Margin="4 4 0 0">
2019
<Grid>
2120
<Grid.RowDefinitions>
2221
<RowDefinition Height="140" />
@@ -40,7 +39,7 @@
4039
</StackPanel>
4140
<StackPanel HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Margin="8">
4241
<Button Style="{StaticResource MaterialDesignToolButton}" Width="30" Padding="2 0 2 0"
43-
wpf:RippleAssist.IsCentered="True">
42+
materialDesign:RippleAssist.IsCentered="True">
4443
<Viewbox Width="16" Height="16">
4544
<Canvas Width="24" Height="24">
4645
<Path Data="M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z"
@@ -49,7 +48,7 @@
4948
</Viewbox>
5049
</Button>
5150
<Button Style="{StaticResource MaterialDesignToolButton}" Width="30" Padding="2 0 2 0"
52-
wpf:RippleAssist.IsCentered="True">
51+
materialDesign:RippleAssist.IsCentered="True">
5352
<Viewbox Width="16" Height="16">
5453
<Canvas Width="24" Height="24">
5554
<Path Data="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
@@ -59,13 +58,13 @@
5958
</Button>
6059
</StackPanel>
6160
</Grid>
62-
</wpf:Card>
63-
<wpf:Card Margin="4 4 0 0" Background="{DynamicResource PrimaryHueLightBrush}"
61+
</materialDesign:Card>
62+
<materialDesign:Card Margin="4 4 0 0" Background="{DynamicResource PrimaryHueLightBrush}"
6463
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
6564
Padding="8">
6665
<TextBlock FontSize="16">Boring Text</TextBlock>
67-
</wpf:Card>
68-
<wpf:Card Margin="4 4 0 0" Background="{DynamicResource PrimaryHueDarkBrush}"
66+
</materialDesign:Card>
67+
<materialDesign:Card Margin="4 4 0 0" Background="{DynamicResource PrimaryHueDarkBrush}"
6968
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
7069
Padding="8">
7170
<StackPanel>
@@ -74,11 +73,11 @@
7473
<CheckBox Style="{StaticResource MaterialDesignUserForegroundCheckBox}">Take a breather</CheckBox>
7574
<CheckBox Style="{StaticResource MaterialDesignUserForegroundCheckBox}">And go create</CheckBox>
7675
</StackPanel>
77-
</wpf:Card>
78-
<wpf:Card Margin="4 4 0 0" Background="{DynamicResource PrimaryHueDarkBrush}"
76+
</materialDesign:Card>
77+
<materialDesign:Card Margin="4 4 0 0" Background="{DynamicResource PrimaryHueDarkBrush}"
7978
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
8079
Padding="8" UniformCornerRadius="6">
8180
<TextBlock TextWrapping="Wrap">You can adjust the corner radius</TextBlock>
82-
</wpf:Card>
81+
</materialDesign:Card>
8382
</WrapPanel>
8483
</UserControl>

MainDemo.Wpf/ColorZones.xaml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,46 @@
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:MaterialDesignColors.WpfExample"
7-
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
87
mc:Ignorable="d"
98
d:DesignHeight="800" d:DesignWidth="600">
109
<ScrollViewer>
1110
<StackPanel Margin="16">
1211
<TextBlock FontSize="16">Colour Zones</TextBlock>
1312
<TextBlock TextWrapping="Wrap" Margin="0 16 0 0">The ColorZone control allows you to easily define striking blocks of colour to give your application extra clarity and style, whilst still remaining within the bounds of your Material Design palette.</TextBlock>
1413
<TextBlock Margin="0 16 0 0" FontSize="10">Invert the basic paper/body colours.</TextBlock>
15-
<wpf:ColorZone Mode="Inverted" Padding="16">
14+
<materialDesign:ColorZone Mode="Inverted" Padding="16">
1615
<DockPanel>
1716
<StackPanel Orientation="Horizontal">
1817
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
1918
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
2019
</StackPanel>
2120
<Button Style="{DynamicResource MaterialDesignToolForegroundButton}" DockPanel.Dock="Right" HorizontalAlignment="Right"
22-
wpf:RippleAssist.IsCentered="True">
21+
materialDesign:RippleAssist.IsCentered="True">
2322
<Viewbox Width="16" Height="16">
2423
<Canvas Width="24" Height="24">
2524
<Path Data="M2,21L23,12L2,3V10L17,12L2,14V21Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
2625
</Canvas>
2726
</Viewbox>
2827
</Button>
2928
</DockPanel>
30-
</wpf:ColorZone>
29+
</materialDesign:ColorZone>
3130
<TextBlock Margin="0 16 0 0" FontSize="10">Use primary light back and fore colours.</TextBlock>
32-
<wpf:ColorZone Mode="PrimaryLight" Padding="16">
31+
<materialDesign:ColorZone Mode="PrimaryLight" Padding="16">
3332
<StackPanel Orientation="Horizontal">
3433
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
3534
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
3635
</StackPanel>
37-
</wpf:ColorZone>
36+
</materialDesign:ColorZone>
3837
<TextBlock Margin="0 16 0 0" FontSize="10">Use primary mid colours, and nest colour zones!</TextBlock>
39-
<wpf:ColorZone Mode="PrimaryMid" Padding="16">
38+
<materialDesign:ColorZone Mode="PrimaryMid" Padding="16">
4039
<StackPanel Orientation="Horizontal"
41-
wpf:RippleAssist.IsCentered="True">
40+
materialDesign:RippleAssist.IsCentered="True">
4241
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
43-
<wpf:ColorZone Mode="Standard" Padding="8 4 8 4" CornerRadius="2" Panel.ZIndex="1"
42+
<materialDesign:ColorZone Mode="Standard" Padding="8 4 8 4" CornerRadius="2" Panel.ZIndex="1"
4443
Margin="16 0 0 0"
45-
wpf:ShadowAssist.ShadowDepth="Depth1">
44+
materialDesign:ShadowAssist.ShadowDepth="Depth1">
4645
<Grid>
4746
<Grid.ColumnDefinitions>
4847
<ColumnDefinition Width="Auto" />
@@ -53,21 +52,21 @@
5352
<Viewbox Width="16" Height="16" VerticalAlignment="Center" Opacity=".56">
5453
<Canvas Width="24" Height="24">
5554
<Path Data="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"
56-
Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=wpf:ColorZone}, Path=Foreground}" />
55+
Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=materialDesign:ColorZone}, Path=Foreground}" />
5756
</Canvas>
5857
</Viewbox>
5958
</Button>
60-
<TextBox Grid.Column="1" Margin="8 0 0 0" wpf:TextFieldAssist.Hint="Build a search bar" MinWidth="200" VerticalAlignment="Center" />
59+
<TextBox Grid.Column="1" Margin="8 0 0 0" materialDesign:TextFieldAssist.Hint="Build a search bar" MinWidth="200" VerticalAlignment="Center" />
6160
<Button Style="{DynamicResource MaterialDesignToolButton}" Grid.Column="2">
6261
<Viewbox Width="16" Height="16" Margin="8 0 0 0" Opacity=".56">
6362
<Canvas Width="24" Height="24">
6463
<Path Data="M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z"
65-
Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=wpf:ColorZone}, Path=Foreground}" />
64+
Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=materialDesign:ColorZone}, Path=Foreground}" />
6665
</Canvas>
6766
</Viewbox>
6867
</Button>
6968
</Grid>
70-
</wpf:ColorZone>
69+
</materialDesign:ColorZone>
7170
<Button Style="{DynamicResource MaterialDesignToolForegroundButton}" Margin="8 0 0 0" Panel.ZIndex="0">
7271
<Viewbox Width="16" Height="16">
7372
<Canvas Width="24" Height="24">
@@ -76,21 +75,21 @@
7675
</Viewbox>
7776
</Button>
7877
</StackPanel>
79-
</wpf:ColorZone>
78+
</materialDesign:ColorZone>
8079
<TextBlock Margin="0 16 0 0" FontSize="10">Add in a corner radius and shadow.</TextBlock>
81-
<wpf:ColorZone Mode="PrimaryDark" Padding="16" CornerRadius="3" wpf:ShadowAssist.ShadowDepth="Depth3" Margin="2">
80+
<materialDesign:ColorZone Mode="PrimaryDark" Padding="16" CornerRadius="3" materialDesign:ShadowAssist.ShadowDepth="Depth3" Margin="2">
8281
<StackPanel Orientation="Horizontal">
8382
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
8483
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
8584
</StackPanel>
86-
</wpf:ColorZone>
85+
</materialDesign:ColorZone>
8786
<TextBlock Margin="0 16 0 0" FontSize="10">Use accent back and fore colours.</TextBlock>
88-
<wpf:ColorZone Mode="Accent" Padding="16">
87+
<materialDesign:ColorZone Mode="Accent" Padding="16">
8988
<StackPanel Orientation="Horizontal">
9089
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
9190
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
9291
</StackPanel>
93-
</wpf:ColorZone>
92+
</materialDesign:ColorZone>
9493
</StackPanel>
9594
</ScrollViewer>
9695

0 commit comments

Comments
 (0)