Map rotation

This sample demonstrates how to rotate a map.

Rotate the map

Instructions

Use the available slider to dictate the number of degrees the map is rotated

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>

        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel x:Name="MyStackPanel" Orientation="Horizontal" Grid.Row="0">
            <DockPanel VerticalAlignment="Top" Background="White" Height="30" Margin="5">
                <TextBlock>Slide to rotate Map   </TextBlock>
                <Slider x:Name="MySlider" Minimum="0" Maximum="180" Value="0" ValueChanged="MySlider_ValueChanged" Width="500"/>
                <Label x:Name="MyLabel" DockPanel.Dock="Right"/>
            </DockPanel>
        </StackPanel>
        <esri:MapView x:Name="MyMapView" Grid.Row="1"/>

    </Grid>
</UserControl>


In this topic
  1. Instructions
  2. Code