<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="MapsSamples.DemoMaps" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:MapsSamples">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/MapsSamples.4;component/CommonResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <local:TypeNameConverter x:Key="typeNameConverter" />        
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <!-- Property Editors -->
        <Border>
            <WrapPanel ItemWidth="260" Margin="0 0 0 10">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Source: " VerticalAlignment="Center" />
                    <ComboBox VerticalAlignment="Center" Width="155" Padding="4,3,0,3" SelectedItem="{Binding Source, ElementName=maps, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="0">
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Converter={StaticResource typeNameConverter}}" />
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                        <c1:VirtualEarthAerialSource />
                        <c1:VirtualEarthRoadSource />
                        <c1:VirtualEarthHybridSource />
                    </ComboBox>
                </StackPanel>

                <StackPanel Margin="30 0 0 0" Orientation="Horizontal">
                    <TextBlock Text="ShowTools: " VerticalAlignment="Center" />
                    <CheckBox VerticalAlignment="Center" IsChecked="{Binding ShowTools, ElementName=maps, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                </StackPanel>

            </WrapPanel>
        </Border>
        <!-- Control instance -->
        <Border Grid.Row="1">
            <c1:C1Maps Name="maps" Zoom="1" />
        </Border>


    </Grid>
</UserControl>