forked from timmerk/cardreadergui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EMVCard.xaml
36 lines (33 loc) · 2.1 KB
/
EMVCard.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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:crg="clr-namespace:CardReaderGui">
<DataTemplate DataType="{x:Type crg:EMVCard}">
<Border CornerRadius="8" Background="Gray">
<StackPanel>
<Border CornerRadius="8,8,0,0" Background="#2f000000">
<TextBlock Margin="8" Text="{Binding Label}" FontSize="36" Foreground="White" FontWeight="Bold" FontStyle="Italic" />
</Border>
<TextBlock Margin="8,25,5,5" VerticalAlignment="Center" Text="{Binding NumberString}" FontSize="36"/>
<TextBlock Margin="8,15,5,5" VerticalAlignment="Center" Text="{Binding Path=Name}" FontSize="24"/>
<StackPanel Orientation="Horizontal">
<TextBlock Margin="8,15,5,5" VerticalAlignment="Center" Text="{Binding Path=ExpiryString, StringFormat='Expiry: {0}'}" FontSize="14"/>
<TextBlock Margin="100,15,5,5" VerticalAlignment="Center" Text="{Binding CardType}" FontSize="14"/>
</StackPanel>
<Button Margin="10,0,10,0" MaxWidth="60" HorizontalAlignment="Right" Command="crg:Command.OpenProperties">Detail...</Button>
</StackPanel>
</Border>
</DataTemplate>
<!-- data template for the propertywindow -->
<DataTemplate DataType="{x:Type crg:TagData}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="NameGroup"/>
<ColumnDefinition SharedSizeGroup="IdGroup"/>
<ColumnDefinition SharedSizeGroup="DataGroup"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="3,1,3,1" Text="{Binding Name}"/>
<TextBlock Grid.Column="1" Margin="10,1,3,1" Text="{Binding Id, StringFormat='X2'}"/>
<TextBlock Grid.Column="2" Margin="10,1,3,1" Text="{Binding DataString}" FontFamily="Courier New"/>
</Grid>
</DataTemplate>
</ResourceDictionary>