Skip to main content

PushpinLocationAnimation.Duration Property

Gets or sets the animation duration when the location of a pushpin element is specified on a map.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v23.1.dll

NuGet Package: DevExpress.Wpf.Map


public Duration Duration { get; set; }

Property Value

Type Description

A Duration structure.


This example illustrates how to provide animation for a map pushpin.

To do this, it is necessary to create a PushpinLocationAnimation object and assign it to the MapPushpin.LocationChangedAnimation property. After that, it becomes possible to customize the animation duration (PushpinLocationAnimation.Duration) and easing function (PushpinLocationAnimation.EasingFunction).

In addition, you can change the pushpin state after its location animation is complete via the PushpinLocationAnimation.Completed event. In this example, this event is used to change the pushpin location randomly each time the bouncing animation effect is complete.

View Example

<Window x:Class="LocationAnimation.MainWindow"
        Title="MainWindow" Height="350" Width="525" >    
                    <dxm:MapPushpin x:Name="pushpin" TraceDepth="30" TraceStroke="Red" >
                            <dxm:PushpinLocationAnimation  Duration="00:00:02"  Completed="PushpinLocationAnimation_Completed" >
See Also