Display a grid

Display a map grid
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.WPF.Samples.DisplayGrid.DisplayGrid"
    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:esri="http://schemas.esri.com/arcgis/runtime/2013"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="ComboBox">
            <Setter Property="Margin" Value="5" />
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="5" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border Background="White"
                BorderBrush="Black" BorderThickness="1"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="400">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="2*" />
                </Grid.ColumnDefinitions>
                <!-- Labels -->
                <Label Content="Grid type"
                       Grid.Row="0" Grid.Column="0" />
                <Label Content="Show grid"
                       Grid.Row="1" Grid.Column="0" />
                <Label Content="Show labels"
                       Grid.Row="2" Grid.Column="0" />
                <Label Content="Grid color"
                       Grid.Row="3" Grid.Column="0" />
                <Label Content="Label color"
                       Grid.Row="4" Grid.Column="0" />
                <Label Content="Halo color"
                       Grid.Row="5" Grid.Column="0" />
                <Label Content="Label position"
                       Grid.Row="6" Grid.Column="0" />
                <Label Content="Label format"
                       Grid.Row="7" Grid.Column="0" />
                <!-- Inputs -->
                <ComboBox x:Name="GridTypeCombo"
                          Grid.Row="0" Grid.Column="1" />
                <CheckBox x:Name="GridVisibilityCheckbox"
                          IsChecked="True" Margin="5"
                          Grid.Row="1" Grid.Column="1" />
                <CheckBox x:Name="LabelVisibilityCheckbox"
                          IsChecked="True" Margin="5"
                          Grid.Row="2" Grid.Column="1" />
                <ComboBox x:Name="GridColorCombo"
                          Grid.Row="3" Grid.Column="1" />
                <ComboBox x:Name="LabelColorCombo"
                          Grid.Row="4" Grid.Column="1" />
                <ComboBox x:Name="HaloColorCombo"
                          Grid.Row="5" Grid.Column="1" />
                <ComboBox x:Name="LabelPositionCombo"
                          Grid.Row="6" Grid.Column="1" />
                <ComboBox x:Name="LabelFormatCombo"
                          Grid.Row="7" Grid.Column="1" />
                <!-- Apply -->
                <Button x:Name="ApplySettingsButton"
                        Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="2"
                        Content="Apply settings"
                        IsEnabled="False" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code