This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
/
MainWindow.xaml
52 lines (52 loc) · 2.03 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
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TreeMapFlatDataAdapterSample"
xmlns:dxtm="http://schemas.devexpress.com/winfx/2008/xaml/treemap"
x:Class="TreeMapFlatDataAdapterSample.MainWindow"
Title="MainWindow"
Height="350"
Width="525">
<!--region #TreeMapFlatDataAdapter-->
<Window.Resources>
<XmlDataProvider
x:Key="gdpDataSource"
Source="Data/top10gdp.xml"/>
<DataTemplate
x:Key="headerTemplate">
<Border
BorderBrush="#606060"
BorderThickness="1"
Margin="4,4,4,-4">
<TextBlock
Padding="6,2,0,2"
Text="{Binding Label}"
Background="#808080"
Foreground="White"/>
</Border>
</DataTemplate>
</Window.Resources>
<Grid>
<dxtm:TreeMapControl>
<dxtm:TreeMapControl.Colorizer>
<dxtm:TreeMapPaletteColorizer>
<dxtm:Office2016Palette/>
</dxtm:TreeMapPaletteColorizer>
</dxtm:TreeMapControl.Colorizer>
<dxtm:TreeMapFlatDataAdapter
DataSource="{Binding Source={StaticResource gdpDataSource}}"
DataMember="Country"
LabelDataMember="Name"
ValueDataMember="Gdp">
<dxtm:TreeMapFlatDataAdapter.Groups>
<dxtm:GroupDefinitionCollection>
<dxtm:TreeMapGroupDefinition
GroupDataMember="SideOfWorld"
HeaderContentTemplate="{Binding Source={StaticResource headerTemplate}}"/>
</dxtm:GroupDefinitionCollection>
</dxtm:TreeMapFlatDataAdapter.Groups>
</dxtm:TreeMapFlatDataAdapter>
</dxtm:TreeMapControl>
</Grid>
<!--endregion #TreeMapFlatDataAdapter-->
</Window>