-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDVHWindow.xaml
103 lines (93 loc) · 6.73 KB
/
DVHWindow.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<Window x:Class="EQD2Converter.DVHWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:oxy="http://oxyplot.org/wpf"
xmlns:local="clr-namespace:EQD2Converter"
mc:Ignorable="d"
Title="DVHWindow" Height="800" Width="1500">
<Window.Resources>
<Style x:Key="ColumnElementStyle" TargetType="TextBlock">
<Setter Property="Margin" Value="10,0,10,0" />
</Style>
<Style x:Key="DataGridContentCellCentering" TargetType="DataGridCell">
<Style.Resources>
<Style TargetType="ContentPresenter">
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
</Style.Resources>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Button}"/>
<Style TargetType="{x:Type Label}"/>
<Style TargetType="{x:Type CheckBox}"/>
<Style TargetType="{x:Type ToolTip}"/>
<Style TargetType="{x:Type TextBlock}"/>
<Style TargetType="{x:Type StackPanel}"/>
<Style TargetType="{x:Type GroupBox}"/>
<Style TargetType="{x:Type ScrollBar}"/>
<Style TargetType="{x:Type TabControl}"/>
<Style TargetType="{x:Type TabItem}"/>
<Style TargetType="{x:Type TextBox}"/>
<Style TargetType="{x:Type Slider}"/>
<Style TargetType="{x:Type ListView}"/>
<Style TargetType="{x:Type ListViewItem}"/>
<Style TargetType="{x:Type oxy:TrackerControl}">
<Setter Property="LineStroke" Value="Red" />
</Style>
</Window.Resources>
<Grid Margin="5,5,5,5" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*" x:Name="PlotOriginalColumn"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.7*" x:Name="PlotOriginalRow"/>
<RowDefinition Height="0.3*"/>
</Grid.RowDefinitions>
<ListView x:Name="StructureListView" Grid.Row="0" Grid.Column="0" SelectionChanged="StructureListView_SelectionChanged"></ListView>
<oxy:PlotView x:Name="PlotDVH" Grid.Row="0" Grid.Column="1" Width="1200" Height="500" VerticalAlignment="Top"/>
<StackPanel Orientation="Horizontal" Margin="10,10,10,10" Grid.Row="1" Grid.Column="0" VerticalAlignment="Top">
<Label Content="Change colors: " VerticalAlignment="Center"></Label>
<CheckBox x:Name="CheckBoxColors" VerticalAlignment="Center" Checked="CheckBoxColors_Changed" Unchecked="CheckBoxColors_Changed"></CheckBox>
</StackPanel>
<DataGrid Margin="10,10,10,10" Grid.Row="1" Grid.Column="1" x:Name="DataGrid1" IsReadOnly="False" CanUserAddRows="False" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserDeleteRows="False" HorizontalAlignment="Left" Height="Auto" MaxHeight="{Binding RelativeSource={RelativeSource AncestorType={x:Type Grid}}, Path=ActualHeight}" VerticalAlignment="Top" Width="Auto" AutoGenerateColumns="False" VerticalScrollBarVisibility="Visible">
<DataGrid.Columns>
<DataGridTextColumn IsReadOnly="True" Header="Structure Id" Width="200" Binding="{Binding Structure, Mode=TwoWay, NotifyOnSourceUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Volume [cm3]" Width="*" Binding="{Binding StructureVolume, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Dose cover Eclipse" Width="*" Binding="{Binding DoseCoverEclipse, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Sampling cover Converted" Width="*" Binding="{Binding DoseCoverConverted, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Min Dose Eclipse [Gy]" Width="*" Binding="{Binding MinDoseEclipse, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Min Dose Converted [Gy]" Width="*" Binding="{Binding MinDoseConverted, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Max Dose Eclipse [Gy]" Width="*" Binding="{Binding MaxDoseEclipse, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Max Dose Converted [Gy]" Width="*" Binding="{Binding MaxDoseConverted, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Mean Dose Eclipse [Gy]" Width="*" Binding="{Binding MeanDoseEclipse, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
<DataGridTextColumn IsReadOnly="True" Header="Mean Dose Converted [Gy]" Width="*" Binding="{Binding MeanDoseConverted, Mode=TwoWay, NotifyOnTargetUpdated=True}" ElementStyle="{StaticResource ColumnElementStyle}"/>
</DataGrid.Columns>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
</DataGrid>
</Grid>
</Grid>
</Window>