-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSetupCollectionHeader.xaml
35 lines (35 loc) · 1.56 KB
/
SetupCollectionHeader.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
<UserControl x:Class="SetupDiff.SetupCollectionHeader"
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"
mc:Ignorable="d"
xmlns:local="clr-namespace:SetupDiff">
<UserControl.Resources>
<Style x:Key="date" TargetType="TextBlock" BasedOn="{StaticResource smallDate}">
<Setter Property="Margin" Value="0,5,0,5"/>
</Style>
<local:DateTimeConverter x:Key="DateTimeConverter"/>
</UserControl.Resources>
<StackPanel Orientation="Horizontal" x:Name="sp">
<TextBlock Style="{StaticResource cell}"/>
<ItemsControl ItemsSource="{Binding Values}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Style="{StaticResource delBtn}" ToolTip="Click to remove this setup from the comparison table" Command="local:CustomCommands.RemoveSetup" CommandParameter="{Binding Id}">
<StackPanel>
<TextBlock Text="{Binding Setup}" Style="{StaticResource setupNameHeader}"/>
<TextBlock Text="{Binding Path=LastWriteTime, Converter={StaticResource DateTimeConverter}}" Style="{StaticResource date}"/>
<TextBlock Text="{Binding Car}"/>
</StackPanel>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</UserControl>