-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
Chips.xaml
85 lines (82 loc) · 4.53 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
74
75
76
77
78
79
80
81
82
83
84
<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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:smtx="clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML"
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 MaterialDesignHeadline6TextBlock}">Chips</TextBlock>
<StackPanel Grid.Row="1" Margin="0 16 0 0">
<WrapPanel Orientation="Horizontal" smtx:XamlDisplay.Ignore="This">
<smtx:XamlDisplay Key="chips_1" Margin="0 0 6 4">
<materialDesign:Chip Content="James Willock">
<materialDesign:Chip.Icon>
<Image Source="Resources/ProfilePic.jpg" />
</materialDesign:Chip.Icon>
</materialDesign:Chip>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_2" Margin="0 0 4 4">
<materialDesign:Chip>
Example Chip
</materialDesign:Chip>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_3" Margin="0 0 4 4">
<materialDesign:Chip Content="ANZ Bank" Icon="A" />
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_4" Margin="0 0 4 4">
<materialDesign:Chip Content="ZNA Inc" Icon="Z" />
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_5" Margin="0 0 4 4">
<materialDesign:Chip Content="Twitter"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="Twitter"></materialDesign:PackIcon>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
</smtx:XamlDisplay>
</WrapPanel>
<WrapPanel Margin="0 12 0 0" Orientation="Horizontal" smtx:XamlDisplay.Ignore="This">
<smtx:XamlDisplay Key="chips_6" Margin="0 0 4 4">
<materialDesign:Chip Content="James Willock"
IsDeletable="True"
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>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_7" Margin="0 0 4 4">
<materialDesign:Chip Content="Example Chip"
IsDeletable="True"
ToolTip="This is an example chip">
</materialDesign:Chip>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_8" Margin="0 0 4 4">
<materialDesign:Chip Content="ANZ Bank"
Icon="A"
IsDeletable="True" />
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="chips_9" Margin="0 0 4 4">
<materialDesign:Chip Content="ZNA Inc"
Icon="Z"
IsDeletable="True"
IconBackground="{DynamicResource PrimaryHueLightBrush}"
IconForeground="{DynamicResource PrimaryHueLightForegroundBrush}" />
</smtx:XamlDisplay>
</WrapPanel>
</StackPanel>
</Grid>
</UserControl>