Adjust Map Animation

This sample demonstrates how to change the duration (in seconds) of animation displayed by the map during a zoom or pan action. If 0, no animation is used and the map responds immediately to the action. In greater than 0, the value indicates the duration of an animation after a pan or zoom action. The animation experience is designed to enhance the user interaction with the map to provide a more aesthetic and fluid experience. In practice, durations should not exceed 2 seconds.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.LocalMapAnimation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <LinearGradientBrush x:Key="PanelGradient" EndPoint="0.5,1" StartPoint="0.5,0">
                <LinearGradientBrush.RelativeTransform>
                    <TransformGroup>
                        <ScaleTransform CenterY="0.5" CenterX="0.5"/>
                        <SkewTransform CenterY="0.5" CenterX="0.5"/>
                        <RotateTransform Angle="176" CenterY="0.5" CenterX="0.5"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </LinearGradientBrush.RelativeTransform>
                <GradientStop Color="#FF145787" Offset="0.16"/>
                <GradientStop Color="#FF3D7FAC" Offset="0.502"/>
                <GradientStop Color="#FF88C5EF" Offset="0.984"/>
            </LinearGradientBrush>
        </Grid.Resources>

        <esri:Map x:Name="MyMap" ZoomDuration="0:00:00" PanDuration="0:00:00" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000" Background="#FFE3E3E3" MinimumResolution="2445.98490512499">
            <esri:ArcGISLocalTiledLayer ID="Shaded Relief" Path="..\\Data\\TPKs\\Topographic.tpk"/>
        </esri:Map>

        <Canvas HorizontalAlignment="Right" VerticalAlignment="Top" Width="300" Height="130" Margin="0,15,15,0" >
            <Rectangle Canvas.Left="0" Canvas.Top="0" Width="300" Height="130" RadiusX="10" RadiusY="10" Fill="{StaticResource PanelGradient}" Stroke="Gray"  >
                <Rectangle.Effect>
                    <DropShadowEffect/>
                </Rectangle.Effect>
            </Rectangle>
            <Rectangle Canvas.Left="10" Canvas.Top="10" Width="279" Height="111" RadiusX="5" RadiusY="5" Fill="#FFFFFFFF" Stroke="DarkGray" />
            <StackPanel Margin="20,14,10,0">
                <StackPanel Width="255" Height="31" >
                    <TextBlock Text="Set the speed of the Zoom Animation" Height="15" Width="255" Foreground="Black" />
                    <TextBlock x:Name="ZoomValueLabel" Text="Value: 0" Height="16" Width="255" Foreground="Black" />
                </StackPanel>
                <Slider x:Name="ZoomAnimationSlider" Orientation="Horizontal" Minimum="0" Maximum="20" 
                        SmallChange="1" LargeChange="5" Cursor="Hand" ValueChanged="ZoomAnimation_ValueChanged" />
                <StackPanel Height="31" Width="255">
                    <TextBlock Text="Set the speed of the Pan Animation" Height="15" Width="255" Foreground="Black"/>
                    <TextBlock x:Name="PanValueLabel" Text="Value: 0" Height="16" Width="255" Foreground="Black" />
                </StackPanel>
                <Slider x:Name="PanAnimationSlider" Orientation="Horizontal" Minimum="0" Maximum="20" 
                        SmallChange="1" LargeChange="5" Cursor="Hand" ValueChanged="PanAnimation_ValueChanged" />
            </StackPanel>
        </Canvas>

    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014