-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
166 lines (135 loc) · 8.66 KB
/
MainWindow.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<Window x:Class="SharkViz.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
xmlns:local="clr-namespace:SharkViz"
Title="Shark Viz" Height="1024" Width="768" WindowState="Maximized">
<Window.Resources>
<local:PushpinScaleTransform x:Key="PushpinScaleTransform" />
<DataTemplate x:Key="ListeningStationTemplate">
<Canvas Width="{Binding Diameter}" Height="{Binding Diameter}" m:MapLayer.Position="{Binding Location}" m:MapLayer.PositionOrigin="Center" Opacity="1.0">
<Ellipse Width="{Binding Diameter}" Height="{Binding Diameter}" Fill="{Binding Fill}" MouseEnter="Ellipse_MouseEnter" MouseLeave="Ellipse_MouseLeave" Tag="{Binding}" RenderTransformOrigin="0.5,0.5" RenderTransform="{Binding ZoomLevel, ElementName=map, Converter={StaticResource PushpinScaleTransform}}" />
</Canvas>
</DataTemplate>
<DataTemplate x:Key="EdgeTemplate">
<local:MapPolylineEx Locations="{Binding Vertices}" Stroke="{Binding Fill}" StrokeThickness="{Binding Width}" Opacity="1.0" StrokeEndLineCap="Round" StrokeStartLineCap="Round" MouseEnter="MapPolyline_MouseEnter" MouseLeave="MapPolyline_MouseLeave" Tag="{Binding}" />
</DataTemplate>
</Window.Resources>
<Grid Background="Black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<m:Map x:Name="map" Grid.Column="0" CredentialsProvider="AqR4BnfUCaw-vAUCjuvDAlSSNtHPvt7vw8omUrZ6OwVId9FYjnM4mxxTDrfxtJMj" Center="-34.14258333,18.58165" ZoomLevel="11">
<m:MapItemsControl ItemsSource="{Binding Edges}" ItemTemplate="{StaticResource EdgeTemplate}" />
<m:MapItemsControl ItemsSource="{Binding ListeningStations}" ItemTemplate="{StaticResource ListeningStationTemplate}" />
<m:MapLayer x:Name="ContentPopupLayer">
<Grid x:Name="ContentPopup" Visibility="Collapsed" Background="White" Opacity="0.85">
<StackPanel Margin="15">
<TextBlock x:Name="ContentPopupText" FontSize="12" FontWeight="Bold" />
<TextBlock x:Name="ContentPopupDescription" FontSize="12" />
</StackPanel>
</Grid>
</m:MapLayer>
</m:Map>
<Expander Grid.Column="1" IsExpanded="True" ExpandDirection="Right" HorizontalAlignment="Left" Margin="0,0,5,0">
<Expander.Header>
<Label HorizontalAlignment="Center" FontSize="15" FontFamily="Arial">Filters</Label>
</Expander.Header>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical">
<Expander IsExpanded="True">
<Expander.Header>
<Label FontSize="15">Node Type</Label>
</Expander.Header>
<StackPanel Orientation="Horizontal" Margin="0,5,0,15">
<RadioButton Margin="5,0,5,0">Shark Minutes</RadioButton>
<RadioButton Margin="5,0,5,0">Unique Sharks</RadioButton>
</StackPanel>
</Expander>
<Expander IsExpanded="True">
<Expander.Header>
<Label FontSize="15">Edge Type</Label>
</Expander.Header>
<StackPanel Orientation="Horizontal" Margin="0,5,0,15">
<RadioButton Margin="5,0,5,0">Total Transitions</RadioButton>
<RadioButton Margin="5,0,5,0">Unique Sharks</RadioButton>
</StackPanel>
</Expander>
<Expander IsExpanded="True">
<Expander.Header>
<Label FontSize="15">Sex</Label>
</Expander.Header>
<StackPanel Orientation="Horizontal" Margin="0,5,0,15">
<RadioButton Margin="5,0,5,0">Both</RadioButton>
<RadioButton Margin="5,0,5,0">Male</RadioButton>
<RadioButton Margin="5,0,5,0">Female</RadioButton>
</StackPanel>
</Expander>
<Expander IsExpanded="True">
<Expander.Header>
<Label FontSize="15">Date Period</Label>
</Expander.Header>
<StackPanel Orientation="Vertical" Margin="0,5,0,15">
<RadioButton Margin="5,0,5,0">All</RadioButton>
<RadioButton Margin="5,0,5,0">Spring</RadioButton>
<RadioButton Margin="5,0,5,0">Summer</RadioButton>
<RadioButton Margin="5,0,5,0">Autumn</RadioButton>
<RadioButton Margin="5,0,5,0">Winter</RadioButton>
<RadioButton Margin="5,0,5,0">Months</RadioButton>
<CheckBox Margin="30,0,5,0">Jan</CheckBox>
<CheckBox Margin="30,0,5,0">Feb</CheckBox>
<CheckBox Margin="30,0,5,0">Feb</CheckBox>
<CheckBox Margin="30,0,5,0">Mar</CheckBox>
<CheckBox Margin="30,0,5,0">Apr</CheckBox>
<CheckBox Margin="30,0,5,0">May</CheckBox>
<CheckBox Margin="30,0,5,0">Jun</CheckBox>
<CheckBox Margin="30,0,5,0">Jul</CheckBox>
<CheckBox Margin="30,0,5,0">Aug</CheckBox>
<CheckBox Margin="30,0,5,0">Sep</CheckBox>
<CheckBox Margin="30,0,5,0">Oct</CheckBox>
<CheckBox Margin="30,0,5,0">Nov</CheckBox>
<CheckBox Margin="30,0,5,0">Dec</CheckBox>
<RadioButton Margin="5,0,5,0">Range</RadioButton>
<StackPanel Orientation="Horizontal" Margin="15,5,0,0">
<Label Margin="0,0,5,0">From:</Label>
<TextBox Margin="0,0,5,0" Width="65"></TextBox>
<Label Margin="0,0,5,0">To:</Label>
<TextBox Margin="0,0,5,0" Width="65"></TextBox>
</StackPanel>
</StackPanel>
</Expander>
<Expander IsExpanded="True">
<Expander.Header>
<Label FontSize="15">Age</Label>
</Expander.Header>
<StackPanel Orientation="Vertical" Margin="0,5,0,15">
<RadioButton Margin="5,0,5,0">All</RadioButton>
<RadioButton Margin="5,0,5,0">Range</RadioButton>
<StackPanel Orientation="Horizontal" Margin="15,5,0,0">
<Label Margin="0,0,5,0">Min:</Label>
<TextBox Margin="0,0,5,0" Width="20"></TextBox>
<Label Margin="0,0,5,0">Max:</Label>
<TextBox Margin="0,0,5,0" Width="20"></TextBox>
</StackPanel>
</StackPanel>
</Expander>
<Expander IsExpanded="True">
<Expander.Header>
<Label FontSize="15">Sharks</Label>
</Expander.Header>
<StackPanel Orientation="Vertical" Margin="0,5,0,15">
<RadioButton Margin="5,0,5,0">All</RadioButton>
<RadioButton Margin="5,0,5,0">Selected</RadioButton>
<CheckBox Margin="30,0,5,0">601</CheckBox>
<CheckBox Margin="30,0,5,0">602</CheckBox>
<CheckBox Margin="30,0,5,0">603</CheckBox>
<CheckBox Margin="30,0,5,0">604</CheckBox>
<CheckBox Margin="30,0,5,0">605</CheckBox>
</StackPanel>
</Expander>
</StackPanel>
</ScrollViewer>
</Expander>
</Grid>
</Window>