This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
/
MainWindow.xaml
58 lines (56 loc) · 3.59 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
<Window x:Class="RangeDistributions.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
Title="MainWindow" Height="600" Width="800">
<Grid>
<dxlc:LayoutControl>
<dxlc:LayoutGroup Orientation="Vertical">
<dxlc:LayoutGroup>
<dxlc:LayoutItem Label="Range Distribution" AddColonToLabel="True">
<dxe:ComboBoxEdit x:Name="rangeDistribution" SelectedIndexChanged="rangeDistribution_SelectedIndexChanged">
<dxm:LinearRangeDistribution x:Name="linear"/>
<dxm:LogarithmicRangeDistribution x:Name="logarithmic"/>
<dxm:ExponentialRangeDistribution x:Name="exponential"/>
</dxe:ComboBoxEdit>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Factor Value" AddColonToLabel="True">
<dxe:SpinEdit x:Name="seFactor" EditValueChanged="factor_EditValueChanged" MaxValue="100" MinValue="0" Increment="0.1"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<dxm:MapControl>
<dxm:VectorLayer ToolTipPattern="{}{NAME}: ${GDP_MD_EST}" ToolTipEnabled="True">
<dxm:ShapefileDataAdapter FileUri="/Data/Countries.shp"/>
<dxm:VectorLayer.Colorizer>
<dxm:ChoroplethColorizer x:Name="colorizer" RangeDistribution="{Binding SelectedItem, ElementName=rangeDistribution}" ApproximateColors="True"
RangeStops="0 3000 10000 18000 28000 44000 82000 185000 1000000 2500000 15000000">
<dxm:ChoroplethColorizer.ValueProvider>
<dxm:ShapeAttributeValueProvider AttributeName="GDP_MD_EST"/>
</dxm:ChoroplethColorizer.ValueProvider>
<dxm:ChoroplethColorizer.Colors>
<Color>#5F8B95</Color>
<Color>#799689</Color>
<Color>#A2A875</Color>
<Color>#CEBB5F</Color>
<Color>#F2CB4E</Color>
<Color>#F1C149</Color>
<Color>#E5A84D</Color>
<Color>#D6864E</Color>
<Color>#C56450</Color>
<Color>#BA4D51</Color>
</dxm:ChoroplethColorizer.Colors>
</dxm:ChoroplethColorizer>
</dxm:VectorLayer.Colorizer>
</dxm:VectorLayer>
</dxm:MapControl>
</dxlc:LayoutItem>
<dxlc:LayoutItem>
<Label Content="{Binding Value, ElementName=factor}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Grid>
</Window>