1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
|
<UserControl x:Class="MaterialDesignColors.WpfExample.Cards"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:smtx="clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Card.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Flipper.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<WrapPanel Margin="0 0 8 8">
<smtx:XamlDisplay Key="cards_1" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Card Width="200">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="140" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Source="Resources/Chartridge046_small.jpg" Height="140" Width="196" Stretch="UniformToFill" />
<Button Grid.Row="0" Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
Margin="0 0 16 -20">
<materialDesign:PackIcon Kind="Bike" />
</Button>
<StackPanel Grid.Row="1" Margin="8 24 8 0" >
<TextBlock FontWeight="Bold">Cycling</TextBlock>
<TextBlock TextWrapping="Wrap" VerticalAlignment="Center">A great way to keep fit and forget about the constant grind of IT.</TextBlock>
</StackPanel>
<StackPanel HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Margin="8">
<Button Style="{StaticResource MaterialDesignToolButton}" Width="30" Padding="2 0 2 0"
materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="ShareVariant" />
</Button>
<Button Style="{StaticResource MaterialDesignToolButton}" Width="30" Padding="2 0 2 0"
materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="Heart" />
</Button>
<materialDesign:PopupBox Style="{StaticResource MaterialDesignToolPopupBox}" Padding="2 0 2 0">
<StackPanel>
<Button Content="More"/>
<Button Content="Options"/>
</StackPanel>
</materialDesign:PopupBox>
</StackPanel>
</Grid>
</materialDesign:Card>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="cards_2" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Card Width="220">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="140" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Source="Resources/Contact.png" Height="140" Stretch="UniformToFill"/>
<Button Grid.Row="0" Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
Margin="0 0 16 -20">
<materialDesign:PackIcon Kind="ShareVariant" />
</Button>
<StackPanel Grid.Row="1" Margin="8 24 8 4" >
<TextBlock Style="{StaticResource MaterialDesignSubheadingTextBlock}" Margin="0">E.T. the Extra-Terrestrial</TextBlock>
<Viewbox Margin="0 4 0 8" Height="16" HorizontalAlignment="Left">
<materialDesign:RatingBar Value="3" Orientation="Horizontal" Foreground="Gold" Margin="0" />
</Viewbox>
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" TextWrapping="Wrap" VerticalAlignment="Center">After a gentle alien becomes stranded on Earth, the being is discovered and befriended by a young boy named Elliott.</TextBlock>
</StackPanel>
<Separator Grid.Row="2" Style="{StaticResource MaterialDesignDarkSeparator}" Margin="8 0 8 0"/>
<TextBlock Grid.Row="3" Margin="8 4 8 4" Style="{StaticResource MaterialDesignBody2TextBlock}">Tonight's availability</TextBlock>
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<materialDesign:PackIcon Grid.Column="0" Kind="Clock" VerticalAlignment="Center" Margin="8 4 4 4"/>
<ListBox Grid.Column="1" Style="{StaticResource MaterialDesignToolToggleFlatListBox}" SelectedIndex="0" Margin="4 8 8 4">
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource MaterialDesignToolToggleListBoxItem}">
<Setter Property="Padding" Value="4 6 4 6" />
</Style>
</ListBox.Resources>
<ListBox.ToolTip>
<StackPanel>
<TextBlock Text="MaterialDesignFlatToggleListBox" />
<TextBlock Text="Exclusive selection" />
<TextBlock Text="ListBoxAssist.IsToggle allows more natural toggle behaviour" />
</StackPanel>
</ListBox.ToolTip>
<ListBoxItem>
<TextBlock Text="18:00"/>
</ListBoxItem>
<ListBoxItem>
<TextBlock Text="19:00"/>
</ListBoxItem>
<ListBoxItem>
<TextBlock Text="22:00"/>
</ListBoxItem>
</ListBox>
</Grid>
<StackPanel Grid.Row="5">
<Button Style="{StaticResource MaterialDesignFlatButton}" HorizontalAlignment="Left" Margin="8 4 8 8">RESERVE</Button>
</StackPanel>
</Grid>
</materialDesign:Card>
</smtx:XamlDisplay>
<StackPanel>
<smtx:XamlDisplay Key="cards_3" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Card Background="#03a9f4"
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Padding="0"
Width="200">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Margin="16 16 16 4" Style="{StaticResource MaterialDesignHeadlineTextBlock}">Call Jennifer</TextBlock>
<Separator Grid.Row="1" Style="{StaticResource MaterialDesignLightSeparator}"/>
<TextBlock Grid.Row="2" Margin="16 0 16 8" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource MaterialDesignBody2TextBlock}">March 19, 2016</TextBlock>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="16 0 16 8" HorizontalAlignment="Right">
<Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignToolForegroundButton}" Width="30" Padding="2 0 2 0"
materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="Phone" />
</Button>
<materialDesign:PopupBox HorizontalAlignment="Right" Style="{StaticResource MaterialDesignToolForegroundPopupBox}" Padding="2 0 2 0">
<StackPanel>
<Button Content="More"/>
<Button Content="Options"/>
</StackPanel>
</materialDesign:PopupBox>
</StackPanel>
</Grid>
</materialDesign:Card>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="cards_4" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Card Background="{DynamicResource PrimaryHueLightBrush}"
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
Width="200"
Padding="8">
<TextBlock FontSize="16">Boring Text</TextBlock>
</materialDesign:Card>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="cards_5" Margin="4 4 0 0">
<materialDesign:Card Background="{DynamicResource PrimaryHueDarkBrush}"
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Width="200"
Padding="8" UniformCornerRadius="6">
<TextBlock TextWrapping="Wrap">You can adjust the corner radius</TextBlock>
</materialDesign:Card>
</smtx:XamlDisplay>
</StackPanel>
<smtx:XamlDisplay Key="cards_6" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Card Background="{DynamicResource PrimaryHueDarkBrush}"
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Width="200"
Padding="8">
<StackPanel>
<TextBlock Margin="16 16 12 8" FontSize="16">Notes</TextBlock>
<CheckBox Margin="16 4 16 0" Style="{StaticResource MaterialDesignUserForegroundCheckBox}">Do something good</CheckBox>
<CheckBox Margin="16 4 16 0" Style="{StaticResource MaterialDesignUserForegroundCheckBox}">Take a breather</CheckBox>
<CheckBox Margin="16 4 16 0" Style="{StaticResource MaterialDesignUserForegroundCheckBox}">And go create</CheckBox>
<Separator Style="{StaticResource MaterialDesignLightSeparator}"/>
<StackPanel Margin="8 0 8 8" Orientation="Horizontal" HorizontalAlignment="Right">
<Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignToolForegroundButton}" Width="30" Padding="2 0 0 0"
materialDesign:RippleAssist.IsCentered="True">
<materialDesign:PackIcon Kind="CheckAll" />
</Button>
</StackPanel>
</StackPanel>
</materialDesign:Card>
</smtx:XamlDisplay>
<!--
For the Card styled <Flipper />, bring in this resource dictionary (see top of this file)
pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Flipper.xaml
-->
<StackPanel>
<smtx:XamlDisplay Key="cards_7" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Flipper Style="{StaticResource MaterialDesignCardFlipper}"
IsFlippedChanged="Flipper_OnIsFlippedChanged">
<materialDesign:Flipper.FrontContent>
<Button Style="{StaticResource MaterialDesignFlatButton}"
Command="{x:Static materialDesign:Flipper.FlipCommand}"
Margin="8"
Width="184"
>FLIPPABLZ!</Button>
</materialDesign:Flipper.FrontContent>
<materialDesign:Flipper.BackContent>
<Button Style="{StaticResource MaterialDesignFlatButton}"
Command="{x:Static materialDesign:Flipper.FlipCommand}"
Margin="8"
Width="184"
>GO BACK</Button>
</materialDesign:Flipper.BackContent>
</materialDesign:Flipper>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="cards_8" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Flipper Style="{StaticResource MaterialDesignCardFlipper}">
<materialDesign:Flipper.FrontContent>
<Grid Height="256" Width="200">
<Grid.RowDefinitions>
<RowDefinition Height="160" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<materialDesign:ColorZone Mode="PrimaryLight" VerticalAlignment="Stretch">
<materialDesign:PackIcon Kind="AccountCircle" Height="128" Width="128"
VerticalAlignment="Center" HorizontalAlignment="Center" />
</materialDesign:ColorZone>
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock>James Willock</TextBlock>
<Button Style="{StaticResource MaterialDesignFlatButton}"
Command="{x:Static materialDesign:Flipper.FlipCommand}"
Margin="0 4 0 0"
>EDIT</Button>
</StackPanel>
</Grid>
</materialDesign:Flipper.FrontContent>
<materialDesign:Flipper.BackContent>
<Grid Height="256" Width="200">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<materialDesign:ColorZone Mode="Accent" Padding="6">
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource MaterialDesignToolForegroundButton}"
Command="{x:Static materialDesign:Flipper.FlipCommand}"
HorizontalAlignment="Left">
<materialDesign:PackIcon Kind="ArrowLeft" HorizontalAlignment="Right" />
</Button>
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">EDIT USER</TextBlock>
</StackPanel>
</materialDesign:ColorZone>
<Grid Grid.Row="1" Margin="0 6 0 0" HorizontalAlignment="Center" VerticalAlignment="Top"
Width="172">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBox materialDesign:HintAssist.Hint="First name" materialDesign:HintAssist.IsFloating="True"
Margin="0 12 0 0">James</TextBox>
<TextBox Grid.Row="1" materialDesign:HintAssist.Hint="Last name" materialDesign:HintAssist.IsFloating="True"
Margin="0 12 0 0">Willock</TextBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 12 0 0" HorizontalAlignment="Right">
<TextBlock VerticalAlignment="Center">Email Contact</TextBlock>
<ToggleButton Margin="8 0 0 0"></ToggleButton>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0 12 0 0" HorizontalAlignment="Right">
<TextBlock VerticalAlignment="Center">Telephone Contact</TextBlock>
<ToggleButton Margin="8 0 0 0"></ToggleButton>
</StackPanel>
</Grid>
</Grid>
</materialDesign:Flipper.BackContent>
</materialDesign:Flipper>
</smtx:XamlDisplay>
</StackPanel>
<smtx:XamlDisplay Key="cards_9" Margin="4 4 0 0" VerticalContentAlignment="Top">
<materialDesign:Flipper Style="{StaticResource MaterialDesignCardFlipper}">
<materialDesign:Flipper.FrontContent>
<Button Style="{StaticResource MaterialDesignFlatButton}"
Command="{x:Static materialDesign:Flipper.FlipCommand}"
Margin="8"
Width="192"
>RESIZING...</Button>
</materialDesign:Flipper.FrontContent>
<materialDesign:Flipper.BackContent>
<Grid Height="256" Width="200">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<materialDesign:ColorZone Mode="Accent" Padding="6">
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource MaterialDesignToolForegroundButton}"
Command="{x:Static materialDesign:Flipper.FlipCommand}"
HorizontalAlignment="Left">
<materialDesign:PackIcon Kind="ArrowLeft" HorizontalAlignment="Right" />
</Button>
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">EDIT USER</TextBlock>
</StackPanel>
</materialDesign:ColorZone>
<Grid Grid.Row="1" Margin="0 6 0 0" HorizontalAlignment="Center" VerticalAlignment="Top"
Width="172">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBox materialDesign:HintAssist.Hint="First name" materialDesign:HintAssist.IsFloating="True"
Margin="0 12 0 0">James</TextBox>
<TextBox Grid.Row="1" materialDesign:HintAssist.Hint="Last name" materialDesign:HintAssist.IsFloating="True"
Margin="0 12 0 0">Willock</TextBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 12 0 0" HorizontalAlignment="Right">
<TextBlock VerticalAlignment="Center">Email Contact</TextBlock>
<ToggleButton Margin="8 0 0 0"></ToggleButton>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0 12 0 0" HorizontalAlignment="Right">
<TextBlock VerticalAlignment="Center">Telephone Contact</TextBlock>
<ToggleButton Margin="8 0 0 0"></ToggleButton>
</StackPanel>
</Grid>
</Grid>
</materialDesign:Flipper.BackContent>
</materialDesign:Flipper>
</smtx:XamlDisplay>
</WrapPanel>
</UserControl>
|