ArcGIS Runtime SDK for .NET Samples

Display device location

Display device location
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.DisplayDeviceLocation.DisplayDeviceLocation"
    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:esriUI="using:Esri.ArcGISRuntime.UI.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <esriUI:MapView x:Name="MyMapView" />
        <Border BorderBrush="Black" BorderThickness="1" Background="White"
                VerticalAlignment="Top" HorizontalAlignment="Right"
                Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="Select autopan mode."
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                           Margin="0,0,0,5"
                           TextAlignment="Center" FontWeight="SemiBold" />
                <ComboBox x:Name="LocationModes"
                          Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                          HorizontalAlignment="Stretch"
                          SelectionChanged="LocationModes_SelectionChanged"/>
                <Button Content="Start"
                        Grid.Row="2" Grid.Column="0"
                        HorizontalAlignment="Stretch" Margin="0,5,5,0"
                        Click="OnStartClicked" />
                <Button Content="Stop"
                        Grid.Row="2" Grid.Column="1"
                        HorizontalAlignment="Stretch" Margin="5,5,0,0"
                        Click="OnStopClicked" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code