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
102
103
104
105
106
107
108
|
<UserControl x:Class="Tango.FSE.Diagnostics.Controls.DiagnosticsGridLinesEditor"
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:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Tango.FSE.Diagnostics.Controls"
xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" x:Name="control" Foreground="#20FFFFFF">
<Grid>
<Rectangle HorizontalAlignment="Left" Stroke="{Binding ElementName=control,Path=Foreground}" />
<ItemsControl ItemsSource="{Binding ElementName=control,Path=VerticalLineEditors}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<local:DiagnosticsGrid Loaded="Columns_DiagnosticsGrid_Loaded" Columns="{Binding ElementName=control,Path=Columns}" Rows="{Binding ElementName=control,Path=RowsZero}" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="FrameworkElement">
<Setter Property="Grid.Column" Value="{Binding Position}"></Setter>
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border>
<Grid HorizontalAlignment="Right">
<Grid Margin="0 -14 -5 0">
<Thumb Width="10" Background="Transparent" Cursor="SizeWE" VerticalAlignment="Top" DragDelta="Vertical_Thumb_DragDelta">
</Thumb>
<material:PackIcon Foreground="{StaticResource FSE_PrimaryForegroundBrush}" RenderTransformOrigin="0.5,0.5" Kind="Triangle" IsHitTestVisible="False" Width="12" Height="12">
<material:PackIcon.RenderTransform>
<RotateTransform Angle="180" />
</material:PackIcon.RenderTransform>
</material:PackIcon>
</Grid>
<Rectangle Opacity="0.6" StrokeThickness="2" IsHitTestVisible="False" Stroke="{Binding ElementName=control,Path=Foreground}" HorizontalAlignment="Right"></Rectangle>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ItemsControl ItemsSource="{Binding ElementName=control,Path=HorizontalLineEditors}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<local:DiagnosticsGrid Loaded="Rows_DiagnosticsGrid_Loaded" Rows="{Binding ElementName=control,Path=Rows}" Columns="{Binding ElementName=control,Path=ColumnsZero}" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="FrameworkElement">
<Setter Property="Grid.Row" Value="{Binding Position}"></Setter>
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border>
<Grid VerticalAlignment="Bottom">
<Grid Margin="-12 0 0 -5.5">
<Thumb Height="10" Background="Transparent" Cursor="SizeNS" HorizontalAlignment="Left" DragDelta="Horizontal_Thumb_DragDelta">
</Thumb>
<material:PackIcon Foreground="{StaticResource FSE_PrimaryForegroundBrush}" RenderTransformOrigin="0.5,0.5" Kind="Triangle" IsHitTestVisible="False" Width="12" Height="12">
<material:PackIcon.RenderTransform>
<RotateTransform Angle="90" />
</material:PackIcon.RenderTransform>
</material:PackIcon>
</Grid>
<Rectangle IsHitTestVisible="False" Opacity="0.6" StrokeThickness="2" Stroke="{Binding ElementName=control,Path=Foreground}" VerticalAlignment="Bottom"></Rectangle>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Width="125" Height="125" Opacity="0.6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10">
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" >
<UniformGrid Height="80" Width="40" Rows="2">
<Button x:Name="btnRemoveRow" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Padding="0" ToolTip="Remove Row" Click="BtnRemoveRow_Click">
<material:PackIcon Kind="Minus" />
</Button>
<Button x:Name="btnAddRow" Margin="0 2 0 0" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Padding="0" ToolTip="Add Row" Click="BtnAddRow_Click">
<material:PackIcon Kind="Plus" />
</Button>
</UniformGrid>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" HorizontalAlignment="Center" Margin="0 5 0 0" Text="{Binding ElementName=control,Path=Rows.Count}"></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom" >
<UniformGrid Height="40" Width="80" Columns="2">
<Button x:Name="btnRemoveColumn" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Padding="0" ToolTip="Remove Column" Click="BtnRemoveColumn_Click">
<material:PackIcon Kind="Minus" />
</Button>
<Button x:Name="btnAddColumn" Margin="2 0 0 0" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Padding="0" ToolTip="Add Column" Click="BtnAddColumn_Click">
<material:PackIcon Kind="Plus" />
</Button>
</UniformGrid>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" VerticalAlignment="Center" Margin="5 0 0 0" Text="{Binding ElementName=control,Path=Columns.Count}"></TextBlock>
</StackPanel>
</Grid>
</Grid>
</UserControl>
|