-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CustomerListCardTemplate.xaml
101 lines (101 loc) · 4.57 KB
/
CustomerListCardTemplate.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<UserControl
x:Class="GroomWise.Views.Templates.CustomerListCardTemplate"
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http:https://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http:https://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:observables="clr-namespace:GroomWise.Application.Observables;assembly=GroomWise.Application"
xmlns:pages="clr-namespace:GroomWise.Views.Pages"
xmlns:russkyc="clr-namespace:org.russkyc.moderncontrols;assembly=Russkyc.ModernControls.WPF"
Height="70"
d:DataContext="{d:DesignInstance observables:ObservableCustomer,
IsDesignTimeCreatable=True}"
d:DesignWidth="700"
Background="Transparent"
mc:Ignorable="d">
<Grid Style="{StaticResource FadeInFromBottomAnimation}">
<russkyc:ModernRadioButton
x:Name="CardButton"
Padding="5"
HorizontalContentAlignment="Stretch"
CheckedBackground="{DynamicResource bg-200}"
Command="{Binding DataContext.GetCustomerInfoCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=pages:CustomersView}}"
CommandParameter="{Binding}"
CornerRadius="10"
DefaultBackground="{DynamicResource bg-000}"
DefaultForeground="{DynamicResource fg-000}"
GroupName="CustomerListGroup"
HoverBackground="{DynamicResource bg-100}"
HoverForeground="{DynamicResource fg-000}"
PressedBackground="{DynamicResource bg-200}"
PressedForeground="{DynamicResource fg-000}" />
<Grid Margin="20,0" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border
Grid.Column="0"
Width="40"
Height="40"
VerticalAlignment="Center"
Background="{DynamicResource primary-default}"
CornerRadius="40" />
<TextBlock
Grid.Column="1"
Margin="20,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
FontWeight="Medium"
Text="{Binding FullName, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Grid.Column="2"
Margin="12,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Address, UpdateSourceTrigger=PropertyChanged}"
TextTrimming="CharacterEllipsis" />
<TextBlock
Grid.Column="3"
Margin="12,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Email, UpdateSourceTrigger=PropertyChanged}"
TextAlignment="Left" />
<ItemsControl
Grid.Column="4"
Width="120"
Margin="12,0,12,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
ItemsSource="{Binding Pets.EditableCollectionView, UpdateSourceTrigger=PropertyChanged}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel
Height="30"
HorizontalAlignment="Center"
Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border
Width="30"
Height="30"
Margin="0,0,-10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Background="{DynamicResource primary-default}"
BorderBrush="{Binding Background, ElementName=CardButton}"
BorderThickness="3"
CornerRadius="40" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Grid>
</UserControl>