ArcGIS Runtime SDK for .NET Samples

Map rotation

Rotate the map
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.WPF.Samples.MapRotation.MapRotation"
    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">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border BorderBrush="Black" BorderThickness="1" Background="White"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="50" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="Slide to rotate the map."
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                           FontWeight="SemiBold"
                           TextAlignment="Center" />
                <Slider x:Name="MySlider"
                        Grid.Row="1" Grid.Column="0"
                        Margin="0,5,0,0"
                        Minimum="0" Maximum="180" Value="0"
                        VerticalAlignment="Center"
                        ValueChanged="MySlider_ValueChanged" />
                <TextBlock x:Name="MyLabel"
                           TextAlignment="Center" VerticalAlignment="Center"
                           Padding="0,2,0,0"
                           Grid.Row="1" Grid.Column="1" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code