-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Chips.xaml
73 lines (73 loc) · 3.92 KB
/
Chips.xaml
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
<UserControl x:Class="MaterialDesignColors.WpfExample.Chips"
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:local="clr-namespace:MaterialDesignColors.WpfExample"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid Margin="32">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}">Chips</TextBlock>
<StackPanel Grid.Row="1" Margin="0 16 0 0">
<WrapPanel Orientation="Horizontal">
<materialDesign:Chip Content="James Willock" Margin="0 0 6 4">
<materialDesign:Chip.Icon>
<Image Source="Resources/ProfilePic.jpg" />
</materialDesign:Chip.Icon>
</materialDesign:Chip>
<materialDesign:Chip Margin="0 0 4 4">
Example Chip
</materialDesign:Chip>
<materialDesign:Chip Content="ANZ Bank"
Icon="A"
Margin="0 0 4 4" />
<materialDesign:Chip Content="ZNA Inc"
Icon="Z"
Margin="0 0 4 4" />
<materialDesign:Chip Content="Twitter"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Margin="0 0 4 4">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="Twitter"></materialDesign:PackIcon>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
</WrapPanel>
<WrapPanel Margin="0 12 0 0" Orientation="Horizontal">
<materialDesign:Chip Content="James Willock"
IsDeletable="True"
Margin="0 0 4 4"
x:Name="ButtonsDemoChip"
Click="ButtonsDemoChip_OnClick"
DeleteClick="ButtonsDemoChip_OnDeleteClick"
ToolTip="Just a tool tip"
DeleteToolTip="Your friendly neighbour delete button"
>
<materialDesign:Chip.Icon>
<Image Source="Resources/ProfilePic.jpg"></Image>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
<materialDesign:Chip Content="Example Chip"
IsDeletable="True"
ToolTip="This is an example chip"
Margin="0 0 4 4">
</materialDesign:Chip>
<materialDesign:Chip Content="ANZ Bank"
Icon="A"
IsDeletable="True"
Margin="0 0 4 4" />
<materialDesign:Chip Content="ZNA Inc"
Icon="Z"
IsDeletable="True"
IconBackground="{DynamicResource PrimaryHueLightBrush}"
IconForeground="{DynamicResource PrimaryHueLightForegroundBrush}"
Margin="0 0 4 4" />
</WrapPanel>
</StackPanel>
</Grid>
</UserControl>