This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
/
MainWindow.xaml
46 lines (43 loc) · 2.41 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
<Window xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
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:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
x:Class="MapControl_CustomGeocodePanel.MainWindow"
Title="MainWindow" Height="480" Width="640">
<Window.Resources>
<sys:String x:Key="bingKey">Your Bing Key</sys:String>
</Window.Resources>
<Grid>
<!--region #Geocoding-->
<dxlc:LayoutControl Orientation="Vertical" Margin="2, 2, 2, 2">
<dxlc:LayoutGroup>
<dxlc:LayoutItem Label="Latitude:">
<dxe:SpinEdit x:Name="teLatitude" MinValue="-90" MaxValue="90" Increment="0.1" Value="{Binding Latitude, Mode=TwoWay}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Longitude:">
<dxe:SpinEdit x:Name="teLongitude" MinValue="-180" MaxValue="180" Increment="0.1" Value="{Binding Longitude, Mode=TwoWay}"/>
</dxlc:LayoutItem>
<Button HorizontalAlignment="Center" VerticalAlignment="Top" Click="Button_Click" Content="Search"/>
</dxlc:LayoutGroup>
<dxlc:LayoutItem VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<dxm:MapControl>
<dxm:ImageTilesLayer>
<dxm:ImageTilesLayer.DataProvider>
<dxm:BingMapDataProvider BingKey="{Binding Source={StaticResource bingKey}}"/>
</dxm:ImageTilesLayer.DataProvider>
</dxm:ImageTilesLayer>
<dxm:InformationLayer>
<dxm:InformationLayer.DataProvider>
<dxm:BingGeocodeDataProvider x:Name="geocodeProvider"
BingKey="{Binding Source={StaticResource bingKey}}"/>
</dxm:InformationLayer.DataProvider>
</dxm:InformationLayer>
</dxm:MapControl>
</dxlc:LayoutItem>
</dxlc:LayoutControl>
<!--endregion #Geocoding-->
</Grid>
</Window>