This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
/
MainWindow.xaml
58 lines (57 loc) · 2.88 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 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
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"
xmlns:dxp="clr-namespace:DevExpress.XtraPrinting;assembly=DevExpress.Printing.v14.2.Core"
x:Class="Exporting.MainWindow"
Title="MainWindow" Height="600" Width="800">
<Window.Resources>
<ObjectDataProvider x:Key="ExportFormatValues"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="dxp:ExportFormat"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ObjectDataProvider x:Key="MapPrintSizeModeValues"
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="dxm:MapPrintSizeMode"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</Window.Resources>
<Grid>
<dxlc:LayoutControl Orientation="Vertical">
<dxlc:LayoutItem VerticalAlignment="Stretch">
<dxm:MapControl x:Name="mapControl">
<dxm:MapControl.PrintOptions>
<dxm:MapPrintOptions SizeMode="{Binding SelectedItem, ElementName=cbPrintSizeMode}"/>
</dxm:MapControl.PrintOptions>
<dxm:ImageTilesLayer>
<dxm:ImageTilesLayer.DataProvider>
<dxm:BingMapDataProvider BingKey="Your Bing Key"/>
</dxm:ImageTilesLayer.DataProvider>
</dxm:ImageTilesLayer>
</dxm:MapControl>
</dxlc:LayoutItem>
<dxlc:LayoutGroup>
<dxlc:LayoutItem Label="Print Size Mode:">
<ComboBox x:Name="cbPrintSizeMode"
ItemsSource="{Binding Source={StaticResource MapPrintSizeModeValues}}"
SelectedIndex="0"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Export to" AddColonToLabel="True">
<ComboBox x:Name="cbExportFormat"
ItemsSource="{Binding Source={StaticResource ExportFormatValues}}"
SelectedIndex="0"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem Width="100">
<Button Content="Export" Click="Button_Click"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Grid>
</Window>