|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
6 | 6 | xmlns:local="clr-namespace:XOutput.UI.Component"
|
| 7 | + xmlns:diagnostics="clr-namespace:XOutput.Diagnostics" |
7 | 8 | mc:Ignorable="d"
|
8 | 9 | d:DataContext="{d:DesignInstance Type=local:DiagnosticsItemViewModel, IsDesignTimeCreatable=False}"
|
9 | 10 | d:DesignHeight="30" d:DesignWidth="490">
|
10 | 11 | <UserControl.Resources>
|
11 | 12 | <DataTemplate x:Key="ResultTemplate">
|
12 |
| - <Grid> |
13 |
| - <Grid.ColumnDefinitions> |
14 |
| - <ColumnDefinition Width="4*" /> |
15 |
| - <ColumnDefinition Width="*" /> |
16 |
| - <ColumnDefinition Width="2*" /> |
17 |
| - </Grid.ColumnDefinitions> |
18 |
| - <Label Grid.Column="0"> |
19 |
| - <Label.Content> |
20 |
| - <MultiBinding Converter="{StaticResource DynamicLanguageConverter}"> |
21 |
| - <Binding Path="Model.Path" RelativeSource="{RelativeSource AncestorType={x:Type local:DiagnosticsItemView}}" /> |
22 |
| - <Binding Path="Type" /> |
23 |
| - </MultiBinding> |
24 |
| - </Label.Content> |
25 |
| - </Label> |
26 |
| - <Label Grid.Column="1" Content="{Binding Value}"/> |
27 |
| - <Label Grid.Column="2"> |
28 |
| - <Label.Content> |
29 |
| - <MultiBinding Converter="{StaticResource DynamicLanguageConverter}"> |
30 |
| - <Binding Path="Model.Path" RelativeSource="{RelativeSource AncestorType={x:Type local:DiagnosticsItemView}}" /> |
31 |
| - <Binding Path="State" /> |
32 |
| - </MultiBinding> |
33 |
| - </Label.Content> |
34 |
| - </Label> |
35 |
| - </Grid> |
| 13 | + <Border BorderThickness="0 0 0 1" BorderBrush="LightGray"> |
| 14 | + <Grid Height="30"> |
| 15 | + <Grid.ColumnDefinitions> |
| 16 | + <ColumnDefinition Width="4*" /> |
| 17 | + <ColumnDefinition Width="*" /> |
| 18 | + <ColumnDefinition Width="40" /> |
| 19 | + </Grid.ColumnDefinitions> |
| 20 | + <Label Grid.Column="0"> |
| 21 | + <Label.Content> |
| 22 | + <MultiBinding Converter="{StaticResource DynamicLanguageConverter}"> |
| 23 | + <Binding Path="DataContext.LanguageModel.Data" RelativeSource="{RelativeSource AncestorType={x:Type local:DiagnosticsItemView}}" /> |
| 24 | + <Binding Path="Type" /> |
| 25 | + </MultiBinding> |
| 26 | + </Label.Content> |
| 27 | + </Label> |
| 28 | + <Label Grid.Column="1"> |
| 29 | + <Label.Content> |
| 30 | + <MultiBinding Converter="{StaticResource DynamicLanguageConverter}"> |
| 31 | + <Binding Path="DataContext.LanguageModel.Data" RelativeSource="{RelativeSource AncestorType={x:Type local:DiagnosticsItemView}}" /> |
| 32 | + <Binding Path="Value" /> |
| 33 | + </MultiBinding> |
| 34 | + </Label.Content> |
| 35 | + </Label> |
| 36 | + <Label Grid.Column="2" Visibility="{Binding State, Converter={StaticResource EqualsToVisibilityConverter}, ConverterParameter={x:Static diagnostics:DiagnosticsResultState.Passed}}"> |
| 37 | + <Canvas> |
| 38 | + <Ellipse Fill="Green" Width="20" Height="20"/> |
| 39 | + <Polygon Fill="White" Points="4,11 5,10 8,13 15,4 16,5 9,16 7,16"/> |
| 40 | + </Canvas> |
| 41 | + </Label> |
| 42 | + <Label Grid.Column="2" Visibility="{Binding State, Converter={StaticResource EqualsToVisibilityConverter}, ConverterParameter={x:Static diagnostics:DiagnosticsResultState.Warning}}"> |
| 43 | + <Canvas> |
| 44 | + <Polygon Fill="Yellow" Points="0,20 10,0 20,20" Stroke="Orange"/> |
| 45 | + <Polygon Fill="Orange" Points="8,6 12,6 11,13 9,13"/> |
| 46 | + <Ellipse Fill="Orange" Width="4" Height="4"> |
| 47 | + <Ellipse.RenderTransform> |
| 48 | + <TranslateTransform X="8" Y="15"/> |
| 49 | + </Ellipse.RenderTransform> |
| 50 | + </Ellipse> |
| 51 | + </Canvas> |
| 52 | + </Label> |
| 53 | + <Label Grid.Column="2" Visibility="{Binding State, Converter={StaticResource EqualsToVisibilityConverter}, ConverterParameter={x:Static diagnostics:DiagnosticsResultState.Failed}}"> |
| 54 | + <Canvas> |
| 55 | + <Ellipse Fill="Red" Width="20" Height="20"/> |
| 56 | + <Rectangle Fill="White" Width="20" Height="20"> |
| 57 | + <Rectangle.RenderTransform> |
| 58 | + <ScaleTransform CenterX="10" CenterY="10" ScaleX="0.5" ScaleY="0.2"/> |
| 59 | + </Rectangle.RenderTransform> |
| 60 | + </Rectangle> |
| 61 | + </Canvas> |
| 62 | + </Label> |
| 63 | + </Grid> |
| 64 | + </Border> |
36 | 65 | </DataTemplate>
|
37 | 66 | </UserControl.Resources>
|
38 |
| - <StackPanel> |
39 |
| - <Label Content="{Binding Model.Source}"/> |
| 67 | + <StackPanel Margin="0 0 0 15"> |
| 68 | + <Label Content="{Binding Model.Source}" FontSize="16"/> |
40 | 69 | <ItemsControl ItemTemplate="{StaticResource ResultTemplate}" ItemsSource="{Binding Model.Results}" />
|
41 | 70 | </StackPanel>
|
42 | 71 | </UserControl>
|
0 commit comments