Skip to content

MapView

Namespace: ThinkGeo.UI.Wpf

This class represents the map control.

public class MapView : MapViewBase, System.Windows.Media.Composition.DUCE+IResource, System.Windows.Media.Animation.IAnimatable, System.Windows.IInputElement, System.Windows.IFrameworkInputElement, System.ComponentModel.ISupportInitialize, System.Windows.Markup.IHaveResources, System.Windows.Markup.IQueryAmbient, System.ComponentModel.INotifyPropertyChanged, System.IDisposable, ThinkGeo.Core.IMapArguments

Inheritance object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → NotifyPropertyControl → MapViewBase → MapView
Implements IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, INotifyPropertyChanged, IDisposable, IMapArguments

Remarks:

The map class inherits from the control, so it can be dragged onto the page or be created and added to a page via code like the popular control itself. You also need to configure the properties of the map. The most important step is adding overlays, which generate images and stack them over each other to form a map image. The map control has many methods and events through which you can interact with the map.

Properties

TiltAngle

Gets or sets the camera tilt (pitch) in degrees, 0 (straight down) to 85. Above 0 the GPU basemap renders the map in perspective: the ground recedes to a horizon, tiles nearer the camera stay detailed while the distance coarsens, and labels stand upright. Has no effect until MapView.Basemap is set. (Available only on the net8 build, where the GPU engine lives.)

public double TiltAngle { get; set; }

Property Value

double

IsTiltEnabled

Gets or sets whether the built-in tilt interaction is on: right-drag (or Alt+drag) turns the bearing by following the cursor's angle around the screen centre - the same feel as the classic Alt rotate - while vertical movement tilts the camera, and while tilted a left-drag pans by keeping the grabbed ground under the cursor. Only ever acts when a MapView.Basemap is present. Default false, so an existing app keeps its exact mouse behavior until it opts in.

public bool IsTiltEnabled { get; set; }

Property Value

bool

Basemap

The GPU-rendered basemap - the ground every overlay sits on. Always composited beneath the whole Overlays collection; its lifecycle (open/draw/transform) is driven by the map. Setting a new basemap disposes the previous one. The camera (TiltAngle, tilt gestures) lives on this MapView and takes effect once a basemap is present. (net8 only, where the GPU engine lives.)

public GpuBasemap Basemap { get; set; }

Property Value

GpuBasemap

Remarks:

The setter only installs: the basemap opens at the end of the current dispatcher frame, so configuring it before assigning and configuring it right after (Map.Basemap = new GpuBasemap(style); followed by more style.Add... calls) reach the first open in the same, complete state.

ClickDoubleClickMode

Gets or sets how MapViewBase.MapClick and MapViewBase.MapDoubleClick are raised for a double-click gesture.

public MapClickDoubleClickMode ClickDoubleClickMode { get; set; }

Property Value

MapClickDoubleClickMode

Remarks:

MapClickDoubleClickMode.MutuallyExclusive (default): a double-click raises only MapViewBase.MapDoubleClick, and MapViewBase.MapClick is deferred until the double-click timeout has passed. Pros: avoids accidental single-click side effects when users intend to double-click. Cons: single-click feedback is delayed by the system double-click interval.

MapClickDoubleClickMode.RaiseClickThenDoubleClick: a double-click raises events in this order: MapViewBase.MapClick (first click), MapViewBase.MapClick (second click), then MapViewBase.MapDoubleClick. Pros: single-click handlers run immediately and every click is observable. Cons: double-click can trigger single-click logic twice before double-click logic runs.

DefaultOverlaysRenderSequenceType

public OverlaysRenderSequenceType DefaultOverlaysRenderSequenceType { get; set; }

Property Value

OverlaysRenderSequenceType

MapUnit

Gets or sets the map unit used by the MapControl.

public GeographyUnit MapUnit { get; set; }

Property Value

GeographyUnit

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

Remarks:

The MapUnit reflects the data unit.

MapWidth

public double MapWidth { get; }

Property Value

double

MapHeight

public double MapHeight { get; }

Property Value

double

RotationAngle

The rotation angle, in degrees. 0 represents North (up), with positive values rotating clockwise.

public double RotationAngle { get; set; }

Property Value

double

CurrentExtent

Gets or sets the current extent of the MapControl.

public RectangleShape CurrentExtent { get; set; }

Property Value

RectangleShape

Remarks:

We recommend setting CurrentScale and CenterPoint instead of setting the CurrentExtent if possible. You can do var centerPoint = extent.GetCenterPoint(); var scale = MapUtil.GetScale(MapView.MapUnit, extent, MapView.MapWidth, MapView.MapHeight); to get the center and the scale from a given extent.

CenterPoint

Get or set the center of the map

public PointShape CenterPoint { get; set; }

Property Value

PointShape

ScaleFactor

public float ScaleFactor { get; set; }

Property Value

float

MapFocusMode

This property gets or sets the MapFocusMode for the MapControl when dealing with the issue of the map taking focus.

public MapFocusMode MapFocusMode { get; set; }

Property Value

MapFocusMode

BackgroundOverlay

Gets or sets the background overlay.

public BackgroundOverlay BackgroundOverlay { get; set; }

Property Value

BackgroundOverlay

AdornmentOverlay

Gets or sets the adornment overlay in the MapControl.

public AdornmentOverlay AdornmentOverlay { get; set; }

Property Value

AdornmentOverlay

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

TrackOverlay

Gets or sets the track overlay in the MapControl.

public TrackInteractiveOverlay TrackOverlay { get; set; }

Property Value

TrackInteractiveOverlay

ExtentOverlay

Gets or sets the extent overlay in the MapControl.

public ExtentInteractiveOverlay ExtentOverlay { get; set; }

Property Value

ExtentInteractiveOverlay

EditOverlay

Gets or sets the edit overlay in the MapControl.

public EditInteractiveOverlay EditOverlay { get; set; }

Property Value

EditInteractiveOverlay

Overlays

This property gets the collection of Overlays in the MapControl.

public GeoCollection<Overlay> Overlays { get; }

Property Value

GeoCollection<Overlay>

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

InteractiveOverlays

This property gets the collection of InteractiveOverlays in the MapControl.

public GeoCollection<InteractiveOverlay> InteractiveOverlays { get; }

Property Value

GeoCollection<InteractiveOverlay>

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

Remarks:

This property is used when you want to change the default behavior of the InteractiveOverlay or add your own customized InteractiveOverlay.

MapTools

Gets a object for simply using MapTools.

public MapTools MapTools { get; protected set; }

Property Value

MapTools

CurrentScale

Gets or sets current viewport scale.

public double CurrentScale { get; set; }

Property Value

double

CurrentZoom

public double CurrentZoom { get; }

Property Value

double

ZoomLevelSet

Gets or sets the ZoomLevelSet used by the MapView. This determines the discrete zoom levels that snapping will target (for example, when double‑clicking or using the mouse wheel). Although snapping aligns the map to these levels, it can still stop at any intermediate scale. This property does not affect how overlays cache tiles; to control that, use TileOverlay.TileMatrixSet.

public ZoomLevelSet ZoomLevelSet { get; set; }

Property Value

ZoomLevelSet

Remarks:

This property is obsolete and will be removed in v14.6. Use MapViewBase.ZoomScales instead:

mapView.ZoomScales = zoomLevelSet.GetScales();

MapResizeMode

Gets a strategy for changing extent when resizes map control.

public MapResizeMode MapResizeMode { get; set; }

Property Value

MapResizeMode

MaximumScale

This property gets and sets a maximum scale when navigating the map.

When you keep zooming out, and the target scale is bigger than the maximum scale, the zooming operation will be stopped.

public double MaximumScale { get; set; }

Property Value

double

MinimumScale

This property gets and sets a minimum scale when navigating the map.

When you keep zooming in, and the target scale is smaller than the minimum scale, the zooming operation will be stopped.

public double MinimumScale { get; set; }

Property Value

double

RestrictExtent

This property gets or sets an extent to restrict the map navigation.

public RectangleShape RestrictExtent { get; set; }

Property Value

RectangleShape

IsRotationEnabled

Gets or sets whether the map accepts a rotation gesture. Default true. Setting it to false leaves MapViewBase.RotationAngle alone no matter what an interactive overlay reports, so a two-finger twist or an Alt-drag has no effect; the angle can still be set in code.

public bool IsRotationEnabled { get; set; }

Property Value

bool

PivotWorldPoint

public PointShape PivotWorldPoint { get; }

Property Value

PointShape

ZoomScales

Gets or sets the ZoomScales used by the MapView. This property controls the scales to which the map can snap (for example, when double-clicking or scrolling with the mouse wheel). Note that while the ZoomScales determines the snapping points, the map itself can stop at any scale. This property does not affect how tiles are cached for a TileOverlay; for that, use the TileOverlay.TileMatrixSet property.

public Collection<double> ZoomScales { get; set; }

Property Value

Collection<double>

CurrentResolution

public double CurrentResolution { get; }

Property Value

double

PivotScreenPoint

public ScreenPointF PivotScreenPoint { get; }

Property Value

ScreenPointF

HistoryExtents

The collection of the history extents the maps has been set.

public Collection<RectangleShape> HistoryExtents { get; }

Property Value

Collection<RectangleShape>

HistoryExtentsCurrentIndex

The index of where the CurrentExtent exists in the HistoryExtents

public int HistoryExtentsCurrentIndex { get; }

Property Value

int

DefaultAnimationSettings

public MapAnimationSettings DefaultAnimationSettings { get; set; }

Property Value

MapAnimationSettings

CancellationTokenSource

Provides a mechanism for canceling ongoing rendering tasks. This property is particularly useful in scenarios where the cancellation token is not directly accessible, such as during certain UI interactions. For instance, a double-click action to zoom on a map triggers rendering without token access, and cancellation can be achieved by invoking this property's Cancel() method.

public CancellationTokenSource CancellationTokenSource { get; set; }

Property Value

CancellationTokenSource

BorderBrush

public Brush BorderBrush { get; set; }

Property Value

Brush

BorderThickness

public Thickness BorderThickness { get; set; }

Property Value

Thickness

Background

public Brush Background { get; set; }

Property Value

Brush

Foreground

public Brush Foreground { get; set; }

Property Value

Brush

FontFamily

public FontFamily FontFamily { get; set; }

Property Value

FontFamily

FontSize

public double FontSize { get; set; }

Property Value

double

FontStretch

public FontStretch FontStretch { get; set; }

Property Value

FontStretch

FontStyle

public FontStyle FontStyle { get; set; }

Property Value

FontStyle

FontWeight

public FontWeight FontWeight { get; set; }

Property Value

FontWeight

HorizontalContentAlignment

public HorizontalAlignment HorizontalContentAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalContentAlignment

public VerticalAlignment VerticalContentAlignment { get; set; }

Property Value

VerticalAlignment

TabIndex

public int TabIndex { get; set; }

Property Value

int

IsTabStop

public bool IsTabStop { get; set; }

Property Value

bool

Padding

public Thickness Padding { get; set; }

Property Value

Thickness

Template

public ControlTemplate Template { get; set; }

Property Value

ControlTemplate

Style

public Style Style { get; set; }

Property Value

Style

OverridesDefaultStyle

public bool OverridesDefaultStyle { get; set; }

Property Value

bool

UseLayoutRounding

public bool UseLayoutRounding { get; set; }

Property Value

bool

Triggers

public TriggerCollection Triggers { get; }

Property Value

TriggerCollection

TemplatedParent

public DependencyObject TemplatedParent { get; }

Property Value

DependencyObject

Resources

public ResourceDictionary Resources { get; set; }

Property Value

ResourceDictionary

DataContext

public object DataContext { get; set; }

Property Value

object

BindingGroup

public BindingGroup BindingGroup { get; set; }

Property Value

BindingGroup

Language

public XmlLanguage Language { get; set; }

Property Value

XmlLanguage

Name

public string Name { get; set; }

Property Value

string

Tag

public object Tag { get; set; }

Property Value

object

InputScope

public InputScope InputScope { get; set; }

Property Value

InputScope

ActualWidth

public double ActualWidth { get; }

Property Value

double

ActualHeight

public double ActualHeight { get; }

Property Value

double

LayoutTransform

public Transform LayoutTransform { get; set; }

Property Value

Transform

Width

public double Width { get; set; }

Property Value

double

MinWidth

public double MinWidth { get; set; }

Property Value

double

MaxWidth

public double MaxWidth { get; set; }

Property Value

double

Height

public double Height { get; set; }

Property Value

double

MinHeight

public double MinHeight { get; set; }

Property Value

double

MaxHeight

public double MaxHeight { get; set; }

Property Value

double

FlowDirection

public FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

Margin

public Thickness Margin { get; set; }

Property Value

Thickness

HorizontalAlignment

public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalAlignment

public VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

FocusVisualStyle

public Style FocusVisualStyle { get; set; }

Property Value

Style

Cursor

public Cursor Cursor { get; set; }

Property Value

Cursor

ForceCursor

public bool ForceCursor { get; set; }

Property Value

bool

IsInitialized

public bool IsInitialized { get; }

Property Value

bool

IsLoaded

public bool IsLoaded { get; }

Property Value

bool

ToolTip

public object ToolTip { get; set; }

Property Value

object

ContextMenu

public ContextMenu ContextMenu { get; set; }

Property Value

ContextMenu

Parent

public DependencyObject Parent { get; }

Property Value

DependencyObject

HasAnimatedProperties

public bool HasAnimatedProperties { get; }

Property Value

bool

InputBindings

public InputBindingCollection InputBindings { get; }

Property Value

InputBindingCollection

CommandBindings

public CommandBindingCollection CommandBindings { get; }

Property Value

CommandBindingCollection

AllowDrop

public bool AllowDrop { get; set; }

Property Value

bool

DesiredSize

public Size DesiredSize { get; }

Property Value

Size

IsMeasureValid

public bool IsMeasureValid { get; }

Property Value

bool

IsArrangeValid

public bool IsArrangeValid { get; }

Property Value

bool

RenderSize

public Size RenderSize { get; set; }

Property Value

Size

RenderTransform

public Transform RenderTransform { get; set; }

Property Value

Transform

RenderTransformOrigin

public Point RenderTransformOrigin { get; set; }

Property Value

Point

IsMouseDirectlyOver

public bool IsMouseDirectlyOver { get; }

Property Value

bool

IsMouseOver

public bool IsMouseOver { get; }

Property Value

bool

IsStylusOver

public bool IsStylusOver { get; }

Property Value

bool

IsKeyboardFocusWithin

public bool IsKeyboardFocusWithin { get; }

Property Value

bool

IsMouseCaptured

public bool IsMouseCaptured { get; }

Property Value

bool

IsMouseCaptureWithin

public bool IsMouseCaptureWithin { get; }

Property Value

bool

IsStylusDirectlyOver

public bool IsStylusDirectlyOver { get; }

Property Value

bool

IsStylusCaptured

public bool IsStylusCaptured { get; }

Property Value

bool

IsStylusCaptureWithin

public bool IsStylusCaptureWithin { get; }

Property Value

bool

IsKeyboardFocused

public bool IsKeyboardFocused { get; }

Property Value

bool

IsInputMethodEnabled

public bool IsInputMethodEnabled { get; }

Property Value

bool

Opacity

public double Opacity { get; set; }

Property Value

double

OpacityMask

public Brush OpacityMask { get; set; }

Property Value

Brush

BitmapEffect

public BitmapEffect BitmapEffect { get; set; }

Property Value

BitmapEffect

Effect

public Effect Effect { get; set; }

Property Value

Effect

BitmapEffectInput

public BitmapEffectInput BitmapEffectInput { get; set; }

Property Value

BitmapEffectInput

CacheMode

public CacheMode CacheMode { get; set; }

Property Value

CacheMode

Uid

public string Uid { get; set; }

Property Value

string

Visibility

public Visibility Visibility { get; set; }

Property Value

Visibility

ClipToBounds

public bool ClipToBounds { get; set; }

Property Value

bool

Clip

public Geometry Clip { get; set; }

Property Value

Geometry

SnapsToDevicePixels

public bool SnapsToDevicePixels { get; set; }

Property Value

bool

IsFocused

public bool IsFocused { get; }

Property Value

bool

IsEnabled

public bool IsEnabled { get; set; }

Property Value

bool

IsHitTestVisible

public bool IsHitTestVisible { get; set; }

Property Value

bool

IsVisible

public bool IsVisible { get; }

Property Value

bool

Focusable

public bool Focusable { get; set; }

Property Value

bool

PersistId

public int PersistId { get; }

Property Value

int

IsManipulationEnabled

public bool IsManipulationEnabled { get; set; }

Property Value

bool

AreAnyTouchesOver

public bool AreAnyTouchesOver { get; }

Property Value

bool

AreAnyTouchesDirectlyOver

public bool AreAnyTouchesDirectlyOver { get; }

Property Value

bool

AreAnyTouchesCapturedWithin

public bool AreAnyTouchesCapturedWithin { get; }

Property Value

bool

AreAnyTouchesCaptured

public bool AreAnyTouchesCaptured { get; }

Property Value

bool

TouchesCaptured

public IEnumerable<TouchDevice> TouchesCaptured { get; }

Property Value

IEnumerable<TouchDevice>

TouchesCapturedWithin

public IEnumerable<TouchDevice> TouchesCapturedWithin { get; }

Property Value

IEnumerable<TouchDevice>

TouchesOver

public IEnumerable<TouchDevice> TouchesOver { get; }

Property Value

IEnumerable<TouchDevice>

TouchesDirectlyOver

public IEnumerable<TouchDevice> TouchesDirectlyOver { get; }

Property Value

IEnumerable<TouchDevice>

DependencyObjectType

public DependencyObjectType DependencyObjectType { get; }

Property Value

DependencyObjectType

IsSealed

public bool IsSealed { get; }

Property Value

bool

Dispatcher

public Dispatcher Dispatcher { get; }

Property Value

Dispatcher

Constructors

MapView()

Constructor of WPF MapControl.

public MapView()

Remarks:

Initializes some class modular variables and hooks up events.

Methods

A(double, double, PointShape&)

 bool A(double , double , PointShape& )

Parameters

`` double

`` double

`` PointShape&

Returns

bool

ToWorldCoordinate(double, double, double)

Converts a screen point to the point it looks at on a horizontal plane above the ground - the plane a building's third floor sits on, the roof of an extrusion.

public PointShape ToWorldCoordinate(double screenX, double screenY, double elevationInMeters)

Parameters

screenX double
Screen x to be converted.

screenY double
Screen y to be converted.

elevationInMeters double
How high above the ground the thing under the cursor is, in metres: above the terrain surface when terrain is on, and not exaggerated, the way a building's height is not.

Returns

PointShape
The point on that plane, with as its Z - the 3D point under the cursor.

Remarks:

A screen point is a line of sight from the camera. Under a tilted camera that line passes over many points at many heights before it reaches the ground: a roof 30 m up and the ground 30 x tan(tilt) metres behind it share one pixel. MapViewBase.ToWorldCoordinate(double, double) assumes the thing clicked is on the ground and answers with that ground point; this overload is told how high the thing is, stops the line of sight at that height, and answers with where the thing really stands. Looking straight down every height is drawn at the same pixel, so the two agree and the flat answer comes back, Z set.

ToScreenCoordinate(PointShape, double)

Converts a world point sitting above the ground to the screen point it is drawn at - the inverse of MapView.ToWorldCoordinate(double, double, double), and what an annotation drawn over the map needs: a label beside a storey of an exploded floor plan, a callout on a rooftop.

public Nullable<ScreenPointF> ToScreenCoordinate(PointShape worldPoint, double elevationInMeters)

Parameters

worldPoint PointShape
Where the thing stands, in the map's projection.

elevationInMeters double
How high above the ground it is, in metres: above the terrain surface when terrain is on, not exaggerated. The Z a point from carries is this value.

Returns

Nullable<ScreenPointF>
The screen point in DIPs, or null when it is behind the camera. Looking straight down, height changes nothing and the flat answer comes back.

TiltToAsync(double, int, CancellationToken)

Animates the tilt from its current angle to (clamped to 0..85) over .

public Task TiltToAsync(double degrees, int durationInMilliseconds, CancellationToken cancellationToken)

Parameters

degrees double
The target tilt in degrees.

durationInMilliseconds int
The animation length; 0 or less jumps straight to the target.

cancellationToken CancellationToken
Stops the animation at the angle it reached.

Returns

Task

Exceptions

OperationCanceledException

        Thrown if the animation is canceled, either through
        or because a newer TiltToAsync superseded it.

Remarks:

A newer TiltToAsync supersedes a running one, the way a newer navigation supersedes ZoomToAsync: the earlier call stops at the angle it reached and its task is canceled.

RotateToAsync(double, int, CancellationToken)

Animates the map rotation from its current angle to over , taking the shortest way around. The overlay canvas transform and the GPU basemap (when one is present) turn in the same frames, so the two never show a transient roll against each other. Works on classic maps too - there is just no GPU host to keep in step.

public Task RotateToAsync(double degrees, int durationInMilliseconds, CancellationToken cancellationToken)

Parameters

degrees double
The target rotation angle in degrees.

durationInMilliseconds int
The animation length; 0 or less jumps straight to the target.

cancellationToken CancellationToken
Stops the animation at the angle it reached.

Returns

Task

Exceptions

OperationCanceledException

        Thrown if the animation is canceled, either through
        or because a newer RotateToAsync superseded it.

Remarks:

A newer RotateToAsync supersedes a running one, the way a newer navigation supersedes ZoomToAsync: the earlier call stops at the angle it reached and its task is canceled.

A(RectangleShape, ExtentChangedType, float, float)

 RectangleShape A(RectangleShape , ExtentChangedType , float , float )

Parameters

`` RectangleShape

`` ExtentChangedType

`` float

`` float

Returns

RectangleShape

A(ValueTuple<double, double, double>, double, double, double)

internal static double A(ValueTuple<double, double, double> a, double , double , double )

Parameters

a ValueTuple<double, double, double>

`` double

`` double

`` double

Returns

double

A(ValueTuple<double, double, double>, ValueTuple<double, double, double>)

internal static double A(ValueTuple<double, double, double> u, ValueTuple<double, double, double> v)

Parameters

u ValueTuple<double, double, double>

v ValueTuple<double, double, double>

Returns

double

Events

MapMouseMove

Occurs every time the mouse moves over the map.

public event EventHandler<MapMouseMoveMapViewEventArgs> MapMouseMove;

Remarks:

MapView-level notification: fires synchronously on the UI thread before any InteractiveOverlay dispatch; not suppressed by EventBubblingMode.NoBubble. Precondition: the event is skipped while the map is uninitialised (CurrentScale == 0 or CenterPoint == null) because world coordinates cannot be computed yet. Once the map has a valid scale and center, fires on every physical mouse move. Contrast with InteractiveOverlay.MapMouseMove (per-overlay dispatch, suppressible).

MapMouseDown

Occurs when a mouse button is pressed on the map.

public event EventHandler<MapMouseDownMapViewEventArgs> MapMouseDown;

Remarks:

Same semantics and readiness gate as MapViewBase.MapMouseMove; see its remarks. Contrast with InteractiveOverlay.MapMouseDown (per-overlay dispatch, suppressible).

MapMouseUp

Occurs when a mouse button is released on the map.

public event EventHandler<MapMouseUpMapViewEventArgs> MapMouseUp;

Remarks:

Same semantics and readiness gate as MapViewBase.MapMouseMove; see its remarks. Contrast with InteractiveOverlay.MapMouseUp (per-overlay dispatch, suppressible).

MapMouseWheel

Occurs when the mouse wheel is rotated over the map.

public event EventHandler<MapMouseWheelMapViewEventArgs> MapMouseWheel;

Remarks:

Same semantics and readiness gate as MapViewBase.MapMouseMove; see its remarks. Contrast with InteractiveOverlay.MapMouseWheel (per-overlay dispatch, suppressible).

MapMouseEnter

Occurs when the mouse enters the map.

public event EventHandler<MapMouseEnterMapViewEventArgs> MapMouseEnter;

Remarks:

Same semantics and readiness gate as MapViewBase.MapMouseMove; see its remarks. Contrast with InteractiveOverlay.MapMouseEnter (per-overlay dispatch, suppressible).

MapMouseLeave

Occurs when the mouse leaves the map.

public event EventHandler<MapMouseLeaveMapViewEventArgs> MapMouseLeave;

Remarks:

Same semantics and readiness gate as MapViewBase.MapMouseMove; see its remarks. Contrast with InteractiveOverlay.MapMouseLeave (per-overlay dispatch, suppressible).

MapKeyDown

Occurs when a key is pressed while the map has focus.

public event EventHandler<MapKeyDownMapViewEventArgs> MapKeyDown;

Remarks:

MapView-level notification — fires synchronously on the UI thread before any InteractiveOverlay dispatch; not suppressed by EventBubblingMode.NoBubble. Unlike the mouse events, this event is not gated on map readiness — it fires even before MapViewBase.CurrentScale is set, because key events carry no world-coordinate payload that would be invalid at that point. Contrast with InteractiveOverlay.MapKeyDown (per-overlay dispatch, suppressible).

MapKeyUp

Occurs when a key is released while the map has focus.

public event EventHandler<MapKeyUpMapViewEventArgs> MapKeyUp;

Remarks:

Same semantics as MapViewBase.MapKeyDown (no map-readiness gate). Contrast with InteractiveOverlay.MapKeyUp (per-overlay dispatch, suppressible).

MapClick

Occurs when clicking on the map.

public event EventHandler<MapClickMapViewEventArgs> MapClick;

MapDoubleClick

Occurs when double click on the map.

public event EventHandler<MapClickMapViewEventArgs> MapDoubleClick;

CurrentExtentChanging

Occurs before map's extent is changing.

public event EventHandler<CurrentExtentChangingMapViewEventArgs> CurrentExtentChanging;

ZoomLevelSetChanged

Occurs after map's zoom level set is changed.

public event EventHandler<ZoomLevelSetChangedMapViewEventArgs> ZoomLevelSetChanged;

CurrentExtentChanged

Occurs after map's extent is changed.

public event EventHandler<CurrentExtentChangedMapViewEventArgs> CurrentExtentChanged;

CurrentScaleChanging

Occurs before map's current scale is changing.

public event EventHandler<CurrentScaleChangingMapViewEventArgs> CurrentScaleChanging;

CurrentScaleChanged

Occurs after map's current scale is changed.

public event EventHandler<CurrentScaleChangedMapViewEventArgs> CurrentScaleChanged;

OverlayDrawing

Occurs before an overlay is drawing.

public event EventHandler<OverlayDrawingMapViewEventArgs> OverlayDrawing;

OverlayDrawn

Occurs after an overlay is drawn.

public event EventHandler<OverlayDrawnMapViewEventArgs> OverlayDrawn;

OverlaysDrawing

Occurs before all overlays are drawing.

public event EventHandler<OverlaysDrawingMapViewEventArgs> OverlaysDrawing;

OverlaysDrawn

Occurs after all overlays are drawn.

public event EventHandler<OverlaysDrawnMapViewEventArgs> OverlaysDrawn;

RotationAngleChanging

public event EventHandler<RotationAngleChangingMapViewEventArgs> RotationAngleChanging;

ZoomScalesChanged

Raised when MapViewBase.ZoomScales is replaced, so anything derived from the ladder - the zoom bar's geometry, a caller's own readout - can be rebuilt against the new one.

public event EventHandler ZoomScalesChanged;

CurrentExtentChangedInAnimation

public event EventHandler<CurrentExtentChangedInAnimationMapViewEventArgs> CurrentExtentChangedInAnimation;

PropertyChanged

PropertyChanged handler

public event PropertyChangedEventHandler PropertyChanged;

PreviewMouseDoubleClick

public event MouseButtonEventHandler PreviewMouseDoubleClick;

MouseDoubleClick

public event MouseButtonEventHandler MouseDoubleClick;

TargetUpdated

public event EventHandler<DataTransferEventArgs> TargetUpdated;

SourceUpdated

public event EventHandler<DataTransferEventArgs> SourceUpdated;

DataContextChanged

public event DependencyPropertyChangedEventHandler DataContextChanged;

RequestBringIntoView

public event RequestBringIntoViewEventHandler RequestBringIntoView;

SizeChanged

public event SizeChangedEventHandler SizeChanged;

Initialized

public event EventHandler Initialized;

Loaded

public event RoutedEventHandler Loaded;

Unloaded

public event RoutedEventHandler Unloaded;

ToolTipOpening

public event ToolTipEventHandler ToolTipOpening;

ToolTipClosing

public event ToolTipEventHandler ToolTipClosing;

ContextMenuOpening

public event ContextMenuEventHandler ContextMenuOpening;

ContextMenuClosing

public event ContextMenuEventHandler ContextMenuClosing;

PreviewMouseDown

public event MouseButtonEventHandler PreviewMouseDown;

MouseDown

public event MouseButtonEventHandler MouseDown;

PreviewMouseUp

public event MouseButtonEventHandler PreviewMouseUp;

MouseUp

public event MouseButtonEventHandler MouseUp;

PreviewMouseLeftButtonDown

public event MouseButtonEventHandler PreviewMouseLeftButtonDown;

MouseLeftButtonDown

public event MouseButtonEventHandler MouseLeftButtonDown;

PreviewMouseLeftButtonUp

public event MouseButtonEventHandler PreviewMouseLeftButtonUp;

MouseLeftButtonUp

public event MouseButtonEventHandler MouseLeftButtonUp;

PreviewMouseRightButtonDown

public event MouseButtonEventHandler PreviewMouseRightButtonDown;

MouseRightButtonDown

public event MouseButtonEventHandler MouseRightButtonDown;

PreviewMouseRightButtonUp

public event MouseButtonEventHandler PreviewMouseRightButtonUp;

MouseRightButtonUp

public event MouseButtonEventHandler MouseRightButtonUp;

PreviewMouseMove

public event MouseEventHandler PreviewMouseMove;

MouseMove

public event MouseEventHandler MouseMove;

PreviewMouseWheel

public event MouseWheelEventHandler PreviewMouseWheel;

MouseWheel

public event MouseWheelEventHandler MouseWheel;

MouseEnter

public event MouseEventHandler MouseEnter;

MouseLeave

public event MouseEventHandler MouseLeave;

GotMouseCapture

public event MouseEventHandler GotMouseCapture;

LostMouseCapture

public event MouseEventHandler LostMouseCapture;

QueryCursor

public event QueryCursorEventHandler QueryCursor;

PreviewStylusDown

public event StylusDownEventHandler PreviewStylusDown;

StylusDown

public event StylusDownEventHandler StylusDown;

PreviewStylusUp

public event StylusEventHandler PreviewStylusUp;

StylusUp

public event StylusEventHandler StylusUp;

PreviewStylusMove

public event StylusEventHandler PreviewStylusMove;

StylusMove

public event StylusEventHandler StylusMove;

PreviewStylusInAirMove

public event StylusEventHandler PreviewStylusInAirMove;

StylusInAirMove

public event StylusEventHandler StylusInAirMove;

StylusEnter

public event StylusEventHandler StylusEnter;

StylusLeave

public event StylusEventHandler StylusLeave;

PreviewStylusInRange

public event StylusEventHandler PreviewStylusInRange;

StylusInRange

public event StylusEventHandler StylusInRange;

PreviewStylusOutOfRange

public event StylusEventHandler PreviewStylusOutOfRange;

StylusOutOfRange

public event StylusEventHandler StylusOutOfRange;

PreviewStylusSystemGesture

public event StylusSystemGestureEventHandler PreviewStylusSystemGesture;

StylusSystemGesture

public event StylusSystemGestureEventHandler StylusSystemGesture;

GotStylusCapture

public event StylusEventHandler GotStylusCapture;

LostStylusCapture

public event StylusEventHandler LostStylusCapture;

StylusButtonDown

public event StylusButtonEventHandler StylusButtonDown;

StylusButtonUp

public event StylusButtonEventHandler StylusButtonUp;

PreviewStylusButtonDown

public event StylusButtonEventHandler PreviewStylusButtonDown;

PreviewStylusButtonUp

public event StylusButtonEventHandler PreviewStylusButtonUp;

PreviewKeyDown

public event KeyEventHandler PreviewKeyDown;

KeyDown

public event KeyEventHandler KeyDown;

PreviewKeyUp

public event KeyEventHandler PreviewKeyUp;

KeyUp

public event KeyEventHandler KeyUp;

PreviewGotKeyboardFocus

public event KeyboardFocusChangedEventHandler PreviewGotKeyboardFocus;

GotKeyboardFocus

public event KeyboardFocusChangedEventHandler GotKeyboardFocus;

PreviewLostKeyboardFocus

public event KeyboardFocusChangedEventHandler PreviewLostKeyboardFocus;

LostKeyboardFocus

public event KeyboardFocusChangedEventHandler LostKeyboardFocus;

PreviewTextInput

public event TextCompositionEventHandler PreviewTextInput;

TextInput

public event TextCompositionEventHandler TextInput;

PreviewQueryContinueDrag

public event QueryContinueDragEventHandler PreviewQueryContinueDrag;

QueryContinueDrag

public event QueryContinueDragEventHandler QueryContinueDrag;

PreviewGiveFeedback

public event GiveFeedbackEventHandler PreviewGiveFeedback;

GiveFeedback

public event GiveFeedbackEventHandler GiveFeedback;

PreviewDragEnter

public event DragEventHandler PreviewDragEnter;

DragEnter

public event DragEventHandler DragEnter;

PreviewDragOver

public event DragEventHandler PreviewDragOver;

DragOver

public event DragEventHandler DragOver;

PreviewDragLeave

public event DragEventHandler PreviewDragLeave;

DragLeave

public event DragEventHandler DragLeave;

PreviewDrop

public event DragEventHandler PreviewDrop;

Drop

public event DragEventHandler Drop;

PreviewTouchDown

public event EventHandler<TouchEventArgs> PreviewTouchDown;

TouchDown

public event EventHandler<TouchEventArgs> TouchDown;

PreviewTouchMove

public event EventHandler<TouchEventArgs> PreviewTouchMove;

TouchMove

public event EventHandler<TouchEventArgs> TouchMove;

PreviewTouchUp

public event EventHandler<TouchEventArgs> PreviewTouchUp;

TouchUp

public event EventHandler<TouchEventArgs> TouchUp;

GotTouchCapture

public event EventHandler<TouchEventArgs> GotTouchCapture;

LostTouchCapture

public event EventHandler<TouchEventArgs> LostTouchCapture;

TouchEnter

public event EventHandler<TouchEventArgs> TouchEnter;

TouchLeave

public event EventHandler<TouchEventArgs> TouchLeave;

IsMouseDirectlyOverChanged

public event DependencyPropertyChangedEventHandler IsMouseDirectlyOverChanged;

IsKeyboardFocusWithinChanged

public event DependencyPropertyChangedEventHandler IsKeyboardFocusWithinChanged;

IsMouseCapturedChanged

public event DependencyPropertyChangedEventHandler IsMouseCapturedChanged;

IsMouseCaptureWithinChanged

public event DependencyPropertyChangedEventHandler IsMouseCaptureWithinChanged;

IsStylusDirectlyOverChanged

public event DependencyPropertyChangedEventHandler IsStylusDirectlyOverChanged;

IsStylusCapturedChanged

public event DependencyPropertyChangedEventHandler IsStylusCapturedChanged;

IsStylusCaptureWithinChanged

public event DependencyPropertyChangedEventHandler IsStylusCaptureWithinChanged;

IsKeyboardFocusedChanged

public event DependencyPropertyChangedEventHandler IsKeyboardFocusedChanged;

LayoutUpdated

public event EventHandler LayoutUpdated;

GotFocus

public event RoutedEventHandler GotFocus;

LostFocus

public event RoutedEventHandler LostFocus;

IsEnabledChanged

public event DependencyPropertyChangedEventHandler IsEnabledChanged;

IsHitTestVisibleChanged

public event DependencyPropertyChangedEventHandler IsHitTestVisibleChanged;

IsVisibleChanged

public event DependencyPropertyChangedEventHandler IsVisibleChanged;

FocusableChanged

public event DependencyPropertyChangedEventHandler FocusableChanged;

ManipulationStarting

public event EventHandler<ManipulationStartingEventArgs> ManipulationStarting;

ManipulationStarted

public event EventHandler<ManipulationStartedEventArgs> ManipulationStarted;

ManipulationDelta

public event EventHandler<ManipulationDeltaEventArgs> ManipulationDelta;

ManipulationInertiaStarting

public event EventHandler<ManipulationInertiaStartingEventArgs> ManipulationInertiaStarting;

ManipulationBoundaryFeedback

public event EventHandler<ManipulationBoundaryFeedbackEventArgs> ManipulationBoundaryFeedback;

ManipulationCompleted

public event EventHandler<ManipulationCompletedEventArgs> ManipulationCompleted;