-
Notifications
You must be signed in to change notification settings - Fork 1
/
SimpleDiploidTraitPage.xaml
90 lines (90 loc) · 5.4 KB
/
SimpleDiploidTraitPage.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
<Page x:Class="Personal_Genome_Explorer.SimpleDiploidTraitPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SimpleDiploidTraitPage"
Width="Auto"
HorizontalAlignment="Left"
xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
<Page.Resources>
<ControlTemplate x:Key="GenotypeHeaderStyle" TargetType="{x:Type Button}">
<Border Background="Silver" TextBlock.Foreground="Black" TextBlock.FontSize="20" TextBlock.TextAlignment="Center" Padding="10,3,10,4">
<ContentPresenter/>
</Border>
</ControlTemplate>
<DataTemplate x:Key="GenotypeColumnStyle">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="60" />
<ColumnDefinition Width="60" />
<ColumnDefinition Width="60" />
<ColumnDefinition Width="60" />
</Grid.ColumnDefinitions>
<Rectangle Grid.ColumnSpan="6" Fill="Gold" Visibility="{Binding Path=ShowHighlight}">
</Rectangle>
<Border Grid.Column="0" Width="290" Padding="5">
<TextBlock VerticalAlignment="Center" TextAlignment="Justify" TextWrapping="Wrap" Text="{Binding Path=Trait}"/>
</Border>
<TextBlock Grid.Column="1" VerticalAlignment="Center" TextAlignment="Center" Width="120" FontSize="25" FontWeight="Bold" Text="{Binding Path=Genotype}"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" TextAlignment="Right" Width="60" Text="{Binding Path=CEU}"/>
<TextBlock Grid.Column="3" VerticalAlignment="Center" TextAlignment="Right" Width="60" Text="{Binding Path=HCB}"/>
<TextBlock Grid.Column="4" VerticalAlignment="Center" TextAlignment="Right" Width="60" Text="{Binding Path=JPT}"/>
<Border Grid.Column="5" Width="50" Margin="0,0,5,0">
<TextBlock Grid.Column="5" VerticalAlignment="Center" TextAlignment="Right" Text="{Binding Path=YRI}"/>
</Border>
</Grid>
</DataTemplate>
<Style x:Key="GenotypeListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border Grid.Row="0" Margin="10">
<StackPanel>
<Border Padding="5,1,5,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Template="{StaticResource GenotypeHeaderStyle}" Content="Trait"/>
<Button Grid.Column="1" Template="{StaticResource GenotypeHeaderStyle}" Content="Genotype"/>
<Button Grid.Column="2" Template="{StaticResource GenotypeHeaderStyle}" Content="CEU"/>
<Button Grid.Column="3" Template="{StaticResource GenotypeHeaderStyle}" Content="HCB"/>
<Button Grid.Column="4" Template="{StaticResource GenotypeHeaderStyle}" Content="JPT"/>
<Button Grid.Column="5" Template="{StaticResource GenotypeHeaderStyle}" Content="YRI"/>
</Grid>
</Border>
<StackPanel IsItemsHost="True"/>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="White" Grid.ColumnSpan="2">
</Rectangle>
<StackPanel Grid.Column="0">
<Label Name="nameLabel" FontSize="30" FontWeight="Bold" Content="Name" Margin="5,15,0,0"/>
<TextBlock HorizontalAlignment="Left" Margin="30,0,0,15">
<Hyperlink Name="snpediaLink" RequestNavigate="SNPediaLink_RequestNavigation">SNPedia</Hyperlink>
</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1">
<StackPanel HorizontalAlignment="Center">
<ListBox x:Name="genotypeList" Style="{StaticResource GenotypeListStyle}" ItemTemplate="{StaticResource GenotypeColumnStyle}" IsHitTestVisible="False" />
<TextBox Name="descriptionLabel" FontSize="16" Width="660" TextWrapping="Wrap" IsReadOnly="True" TextAlignment="Justify" Background="Transparent" BorderThickness="0" VerticalScrollBarVisibility="Disabled" Margin="0,10,0,10">Description</TextBox>
</StackPanel>
</StackPanel>
</Grid>
</Page>