-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLodInfo.xaml
87 lines (75 loc) · 4.06 KB
/
LodInfo.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
<UserControl x:Class="ModelPropertyChecker.LodInfo"
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:ModelPropertyChecker"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:LOD, IsDesignTimeCreatable=True}"
>
<Grid Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ListView Grid.Row="0" ItemsSource="{Binding Path=properties, PresentationTraceSources.TraceLevel=High, UpdateSourceTrigger=PropertyChanged}">
<ListView.View>
<GridView>
<GridViewColumn Header="Key">
<GridViewColumn.DisplayMemberBinding>
<Binding Path="Key" StringFormat="'{0}'" />
</GridViewColumn.DisplayMemberBinding>
</GridViewColumn>
<GridViewColumn Header="Value" DisplayMemberBinding="{Binding Value.value}"/>
</GridView>
</ListView.View>
</ListView>
<GridSplitter Grid.Row="1" Height="5" Width="Auto" ResizeDirection="Rows" ResizeBehavior="PreviousAndNext" ShowsPreview="True"
HorizontalAlignment="Stretch"/>
<ListBox Grid.Row="2" ItemsSource="{Binding Path=propertyExceptions, PresentationTraceSources.TraceLevel=High, UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate DataType="local:PropertyException">
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=isError}" Value="True">
<Setter Property="Text" Value="❌ " />
</DataTrigger>
<DataTrigger Binding="{Binding Path=isError}" Value="False">
<Setter Property="Text" Value="⚠ " />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Height="15">
<TextBlock.Text>
<Binding Path="propertyName" StringFormat="'{0}' " />
</TextBlock.Text>
</TextBlock>
<TextBlock Text="{Binding Message}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox Grid.Row="3" ItemsSource="{Binding Path=selections, PresentationTraceSources.TraceLevel=High, UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Key" />
<ColumnDefinition SharedSizeGroup="Name" />
</Grid.ColumnDefinitions>
<TextBlock Margin="2" Text="{Binding Key}" Grid.Column="0"/>
<TextBlock Margin="2" Text="{Binding Value[0]}" Grid.Column="1"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>