This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
/
MainWindow.xaml
96 lines (96 loc) · 4.39 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
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TreeMapHighlightingSelectionSample"
xmlns:dxtm="http://schemas.devexpress.com/winfx/2008/xaml/treemap"
x:Class="TreeMapHighlightingSelectionSample.MainWindow"
Title="MainWindow"
Height="350"
Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--region #InteractionProperties-->
<dxtm:TreeMapControl Grid.Column="0"
EnableHighlighting="{Binding ElementName=chkHighlighting, Path=IsChecked}"
SelectionMode="{Binding ElementName=cbSelectionMode, Path=SelectedValue}">
<!--endregion #InteractionProperties-->
<dxtm:TreeMapControl.Colorizer>
<dxtm:TreeMapPaletteColorizer>
<dxtm:Office2016Palette/>
</dxtm:TreeMapPaletteColorizer>
</dxtm:TreeMapControl.Colorizer>
<dxtm:TreeMapItemStorage>
<dxtm:TreeMapItem Label="Americas">
<dxtm:TreeMapItem Label="United States"
Value="11384763"/>
<dxtm:TreeMapItem Label="Brazil"
Value="1799612"/>
<dxtm:TreeMapItem Label="Canada"
Value="1572781"/>
</dxtm:TreeMapItem>
<dxtm:TreeMapItem Label="Europe">
<dxtm:TreeMapItem Label="Germany"
Value="3371003"/>
<dxtm:TreeMapItem Label="United Kingdom"
Value="2582021"/>
<dxtm:TreeMapItem Label="France"
Value="2422649"/>
<dxtm:TreeMapItem Label="Italy"
Value="1809047"/>
</dxtm:TreeMapItem>
<dxtm:TreeMapItem Label="Asia">
<dxtm:TreeMapItem Label="China"
Value="17968195"/>
<dxtm:TreeMapItem Label="Japan"
Value="4116242"/>
<dxtm:TreeMapItem Label="India"
Value="2864903"/>
</dxtm:TreeMapItem>
</dxtm:TreeMapItemStorage>
<!--region #CloseTag-->
</dxtm:TreeMapControl>
<!--endregion #CloseTag-->
<Grid Grid.Column="1"
Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<CheckBox Grid.Row="0"
Grid.Column="0"
x:Name="chkHighlighting"/>
<TextBlock Grid.Row="0"
Grid.Column="1"
Margin="4,0,0,0"
Text="Allow Highlighting"/>
<TextBlock Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="0,16,0,0"
Text="Selection Mode:"/>
<ListBox Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
x:Name="cbSelectionMode"
DisplayMemberPath="ModeName"
SelectedValuePath="Mode"
SelectedIndex="0">
<local:SelectionModeWrapper ModeName="None"
Mode="None"/>
<local:SelectionModeWrapper ModeName="Single"
Mode="Single"/>
<local:SelectionModeWrapper ModeName="Multiple"
Mode="Multiple"/>
<local:SelectionModeWrapper ModeName="Extended Single"
Mode="Extended"/>
</ListBox>
</Grid>
</Grid>
</Window>