Skip to content

Commit 9d1383f

Browse files
committed
demo tweaks [skip ci]
1 parent 25e5c8c commit 9d1383f

File tree

4 files changed

+56
-30
lines changed

4 files changed

+56
-30
lines changed

MainDemo.Wpf/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Application.Resources>
66
<ResourceDictionary>
77
<ResourceDictionary.MergedDictionaries>
8-
8+
99
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
1010
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
1111
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />

MainDemo.Wpf/Home.xaml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
<UserControl.Resources>
1010
<ResourceDictionary>
1111
<ResourceDictionary.MergedDictionaries>
12+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
1213
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml" />
13-
<!-- throw in some extra colour for out floating action button -->
14+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
15+
<!-- throw in some extra colour for our floating action button -->
1416
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.Green.Named.Primary.xaml" />
1517
</ResourceDictionary.MergedDictionaries>
1618
</ResourceDictionary>
@@ -26,10 +28,15 @@
2628
<ColumnDefinition Width="*" />
2729
</Grid.ColumnDefinitions>
2830
<Image Source="Resources/ms-icon-310x310.png" Stretch="Uniform" Width="100" Height="100" />
29-
<StackPanel Grid.Column="1" Margin="24 0 0 0">
30-
<TextBlock FontSize="32" TextWrapping="Wrap">Welcome to Material Design In XAML Toolkit</TextBlock>
31-
<TextBlock Margin="0 8 0 10" TextWrapping="Wrap" Foreground="{DynamicResource MaterialDesignBodyLight}">Click EXPLORE to checkout the various controls &amp; themes.</TextBlock>
32-
<Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}">EXPLORE</Button>
31+
<StackPanel Grid.Column="1" Margin="24 0 0 0" VerticalAlignment="Center">
32+
<TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}" TextWrapping="Wrap">Welcome to Material Design In XAML Toolkit</TextBlock>
33+
<Button Style="{StaticResource MaterialDesignFlatButton}"
34+
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}">
35+
<StackPanel Orientation="Horizontal">
36+
<materialDesign:PackIcon Kind="Binoculars" />
37+
<TextBlock Margin="8 0 0 0">EXPLORE</TextBlock>
38+
</StackPanel>
39+
</Button>
3340
</StackPanel>
3441
</Grid>
3542
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
@@ -38,22 +45,22 @@
3845
Margin="0 0 0 32">
3946
<Grid>
4047
<StackPanel Orientation="Horizontal">
41-
<materialDesign:Card Width="420" Margin="4 2 8 16" Height="280">
48+
<materialDesign:Card Width="420" Margin="4 2 8 16" Height="270">
4249
<Grid VerticalAlignment="Stretch" >
4350
<Grid.RowDefinitions>
4451
<RowDefinition Height="Auto" />
52+
<RowDefinition Height="*" />
4553
<RowDefinition Height="Auto" />
46-
<RowDefinition Height="Auto" />
47-
<RowDefinition Height="Auto" />
54+
<RowDefinition Height="Auto" />
4855
</Grid.RowDefinitions>
4956
<Grid.ColumnDefinitions>
5057
<ColumnDefinition Width="200" />
5158
<ColumnDefinition Width="*" />
5259
</Grid.ColumnDefinitions>
53-
<Image Source="Resources/Contact.png" Grid.RowSpan="4" StretchDirection="Both" VerticalAlignment="Stretch" Stretch="UniformToFill" />
54-
<TextBlock Grid.Column="1" FontSize="28" Margin="16 16 16 8" FontWeight="Light">Get In Touch</TextBlock>
60+
<Image Source="Resources/Contact.png" Grid.RowSpan="5" StretchDirection="Both" VerticalAlignment="Stretch" Stretch="UniformToFill" />
61+
<TextBlock Grid.Column="1" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="16 16 16 2">Get In Touch</TextBlock>
5562
<TextBlock Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" Margin="16 0 16 8" Foreground="{DynamicResource MaterialDesignBodyLight}"
56-
VerticalAlignment="Top">Say hello, make a feature request, or raise a bug through one of these channels:</TextBlock>
63+
VerticalAlignment="Center">Say hello, make a feature request, or raise a bug through one of these channels:</TextBlock>
5764
<Border Grid.Column="1" Grid.Row="2" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}" Margin="0 8 0 0">
5865
<Grid Margin="8">
5966
<Button Style="{DynamicResource MaterialDesignFlatButton}" HorizontalAlignment="Left"
@@ -92,21 +99,37 @@
9299
</Border>
93100
</Grid>
94101
</materialDesign:Card>
95-
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="280">
102+
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="270">
96103
<Grid VerticalAlignment="Stretch">
97104
<Grid.RowDefinitions>
98105
<RowDefinition Height="Auto" />
106+
<RowDefinition Height="Auto" />
99107
</Grid.RowDefinitions>
100108
<Grid.ColumnDefinitions>
101109
<ColumnDefinition Width="200" />
102110
<ColumnDefinition Width="*" />
103111
</Grid.ColumnDefinitions>
104112
<materialDesign:PackIcon Kind="GithubCircle" Width="160" Height="160" HorizontalAlignment="Center" VerticalAlignment="Center" />
105113
<StackPanel Grid.Column="1">
106-
<TextBlock FontSize="28" Margin="16 16 16 8" FontWeight="Light">Open Source</TextBlock>
114+
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="16 16 16 8">Open Source</TextBlock>
107115
<TextBlock TextWrapping="Wrap" Margin="16 0 16 8" Foreground="{DynamicResource MaterialDesignBodyLight}"
108116
VerticalAlignment="Top">This project is completely open source. If you like it and want to say thanks you could hit the GitHub Star button, tweet or post about it, or tell your mum about it!</TextBlock>
109117
</StackPanel>
118+
<Border Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
119+
<DockPanel>
120+
<Button Style="{DynamicResource MaterialDesignFlatButton}"
121+
DockPanel.Dock="Right"
122+
x:Name="DonateButton" Click="DonateButton_OnClick">
123+
<StackPanel Orientation="Horizontal">
124+
<materialDesign:PackIcon Kind="Gift" />
125+
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Donate</TextBlock>
126+
</StackPanel>
127+
</Button>
128+
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}" TextWrapping="Wrap" Margin="16" VerticalAlignment="Center">
129+
Feel like you want to make a donation? It would be gratefully received. Click the button to donate via Pledgie.
130+
</TextBlock>
131+
</DockPanel>
132+
</Border>
110133
</Grid>
111134
</materialDesign:Card>
112135
</StackPanel>
@@ -127,10 +150,10 @@
127150
<Button ToolTip="Chat" Click="ChatButton_OnClick">
128151
<!-- mix up the colours by brinking in a named palette (see merged dictionaries at top) -->
129152
<Button.Background>
130-
<SolidColorBrush Color="{StaticResource GreenPrimary500}"></SolidColorBrush>
153+
<SolidColorBrush Color="{StaticResource GreenPrimary500}" />
131154
</Button.Background>
132155
<Button.Foreground>
133-
<SolidColorBrush Color="{StaticResource GreenPrimary500Foreground}"></SolidColorBrush>
156+
<SolidColorBrush Color="{StaticResource GreenPrimary500Foreground}" />
134157
</Button.Foreground>
135158
<materialDesign:PackIcon Kind="Message" />
136159
</Button>
@@ -140,6 +163,16 @@
140163
>
141164
<materialDesign:PackIcon Kind="Email" />
142165
</Button>
166+
<Button ToolTip="Feel like you want to make a donation? It would be gratefully received. Click the button to donate via Pledgie."
167+
Click="DonateButton_OnClick">
168+
<Button.Background>
169+
<SolidColorBrush Color="{StaticResource GreenPrimary200}" />
170+
</Button.Background>
171+
<Button.Foreground>
172+
<SolidColorBrush Color="{StaticResource GreenPrimary200Foreground}" />
173+
</Button.Foreground>
174+
<materialDesign:PackIcon Kind="Gift" />
175+
</Button>
143176
</StackPanel>
144177
</materialDesign:PopupBox>
145178
</Grid>

MainDemo.Wpf/Home.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,10 @@ private void EmailButton_OnClick(object sender, RoutedEventArgs e)
4545
{
4646
Process.Start("mailto://[email protected]");
4747
}
48+
49+
private void DonateButton_OnClick(object sender, RoutedEventArgs e)
50+
{
51+
Process.Start("https://pledgie.com/campaigns/31029");
52+
}
4853
}
4954
}

MainDemo.Wpf/ProvingGround.xaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<ResourceDictionary>
1414
<ResourceDictionary.MergedDictionaries>
1515
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
16+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ProgressBar.xaml" />
1617
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Slider.xaml" />
1718
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
1819
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
@@ -22,20 +23,7 @@
2223

2324

2425
<StackPanel Margin="24" HorizontalAlignment="Stretch">
25-
<materialDesign:PopupBox x:Name="PopupBox" HorizontalAlignment="Right">
26-
<ListBox>
27-
<ListBoxItem>One One One</ListBoxItem>
28-
<ListBoxItem>Two Two Two</ListBoxItem>
29-
<ListBoxItem>Three Three Three</ListBoxItem>
30-
</ListBox>
31-
</materialDesign:PopupBox>
32-
<Button Margin="0 8 0 0">Hello</Button>
33-
<ComboBox Margin="0 8 0 0">
34-
<ComboBoxItem>One One One</ComboBoxItem>
35-
<ComboBoxItem>Two Two Two</ComboBoxItem>
36-
<ComboBoxItem>Three Three Three</ComboBoxItem>
37-
</ComboBox>
38-
<TextBlock Margin="0 8 0 0" Text="{Binding ElementName=PopupBox, Path=IsPopupOpen}" />
26+
<ProgressBar Style="{StaticResource MaterialDesignCircularProgressBar}" Value="20" />
3927
</StackPanel>
4028

4129
</UserControl>

0 commit comments

Comments
 (0)