Mini Kabibi Habibi
<local:MapDemoModule x:Class="MapDemo.WorldWeather"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
xmlns:local="clr-namespace:MapDemo"
mc:Ignorable="d">
<dxdb:DemoModuleControl>
<dxdb:DemoModuleControl.Resources>
<ResourceDictionary>
<local:DemoValuesProvider x:Key="DemoValuesProvider" />
<local:NullObjectToVisibiltyConverter x:Key="visibilityConverter" />
<DataTemplate x:Key="weatherLabel">
<local:WeatherLabel />
</DataTemplate>
</ResourceDictionary>
</dxdb:DemoModuleControl.Resources>
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel>
<dx:GroupFrame Header="Temperature Unit" Margin="0,0,0,10">
<dxe:ListBoxEdit x:Name="lbUnitType" Background="{x:Null}" SelectedIndex="0" ShowBorder="False" EditValueChanged="lbUnitType_EditValueChanged" ItemsSource="{Binding TemperatureUnit, Source={StaticResource DemoValuesProvider}}">
<dxe:ListBoxEdit.StyleSettings>
<dxe:RadioListBoxEditStyleSettings/>
</dxe:ListBoxEdit.StyleSettings>
</dxe:ListBoxEdit>
</dx:GroupFrame>
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<Grid>
<dxm:MapControl x:Name="mapControl" ZoomLevel="3" CenterPoint="40,-30" SelectionMode="Single" MinZoomLevel="3">
<dxm:ImageTilesLayer>
<dxm:ImageTilesLayer.DataProvider>
<dxm:BingMapDataProvider BingKey="{Binding DevexpressBingKey, Source={StaticResource DemoValuesProvider}}" Kind="Area"/>
</dxm:ImageTilesLayer.DataProvider>
</dxm:ImageTilesLayer>
<dxm:VectorLayer x:Name="weatherLayer"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
ItemTemplate="{StaticResource weatherLabel}"
ItemsSource="{Binding OpenWeatherMapService.WeatherInCities, Mode=OneWay}"
LatitudeDataMember="Latitude"
LongitudeDataMember="Longitude"/>
</dxm:MapControl>
<local:WeatherInfoPanel x:Name="weatherInfoPanel"
HorizontalAlignment="Right"
Margin="0,5,5,5"
VerticalAlignment="Top"
Visibility="{Binding Converter={StaticResource visibilityConverter}}"
DataContext="{Binding SelectedItem, ElementName=weatherLayer}"/>
</Grid>
</dxdb:DemoModuleControl>
</local:MapDemoModule>