Language
Edit

MapControl Class

Definition

Forms-enabled wrapper for Windows.UI.Xaml.Controls.Maps.MapControl

public class MapControl : Microsoft.Toolkit.Forms.UI.XamlHost.WindowsXamlHostBase
type MapControl = class
    inherit WindowsXamlHostBase
Public Class MapControl
Inherits WindowsXamlHostBase
Inheritance

Constructors

Name Description
MapControl()

Initializes a new instance of the MapControl class, a Forms-enabled wrapper for Windows.UI.Xaml.Controls.Maps.MapControl

Properties

Name Description
ActualCamera

Gets Windows.UI.Xaml.Controls.Maps.MapControl.ActualCamera

BusinessLandmarksEnabled

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.BusinessLandmarksEnabled

BusinessLandmarksVisible

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.BusinessLandmarksVisible

Center

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.Center

ChildInternal

Gets or sets XAML content for XamlContentHost

(Inherited from WindowsXamlHostBase)
ColorScheme

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.ColorScheme

CustomExperience

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.CustomExperience

DefaultSize

Gets the default size of the control.

(Inherited from WindowsXamlHostBase)
DesiredPitch

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.DesiredPitch

DpiScalingRenderTransform

Gets or sets a value indicating whether a render transform is added to the UWP control corresponding to the current dpi scaling factor if scaling is not supported natively by the XAML island

(Inherited from WindowsXamlHostBase)
Focused

Gets a value indicating whether this Control currently has focus. Check both the Control's window handle and the hosted Xaml window handle. If either has focus then this Control currently has focus.

(Inherited from WindowsXamlHostBase)
Heading

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.Heading

Is3DSupported

Gets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.Is3DSupported

IsStreetsideSupported

Gets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.IsStreetsideSupported

LandmarksVisible

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.LandmarksVisible

Layers

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.Layers

LoadingStatus

Gets Windows.UI.Xaml.Controls.Maps.MapControl.LoadingStatus

MapElements

Gets Windows.UI.Xaml.Controls.Maps.MapControl.MapElements

MapProjection

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.MapProjection

MapServiceToken

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.MapServiceToken

MaxZoomLevel

Gets Windows.UI.Xaml.Controls.Maps.MapControl.MaxZoomLevel

MinZoomLevel

Gets Windows.UI.Xaml.Controls.Maps.MapControl.MinZoomLevel

PanInteractionMode

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.PanInteractionMode

PedestrianFeaturesVisible

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.PedestrianFeaturesVisible

Pitch

Gets Windows.UI.Xaml.Controls.Maps.MapControl.Pitch

Region

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.Region

RotateInteractionMode

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.RotateInteractionMode

Routes

Gets Windows.UI.Xaml.Controls.Maps.MapControl.Routes

Scene

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.Scene

Style

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.Style

StyleSheet

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.StyleSheet

TargetCamera

Gets Windows.UI.Xaml.Controls.Maps.MapControl.TargetCamera

TileSources

Gets Windows.UI.Xaml.Controls.Maps.MapControl.TileSources

TiltInteractionMode

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.TiltInteractionMode

TrafficFlowVisible

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.TrafficFlowVisible

TransformOrigin

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.TransformOrigin

TransitFeaturesEnabled

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.TransitFeaturesEnabled

TransitFeaturesVisible

Gets or sets a value indicating whether Windows.UI.Xaml.Controls.Maps.MapControl.TransitFeaturesVisible

WatermarkMode

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.WatermarkMode

ZoomInteractionMode

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.ZoomInteractionMode

ZoomLevel

Gets or sets Windows.UI.Xaml.Controls.Maps.MapControl.ZoomLevel

Methods

Name Description
Dispose(Boolean)
FindMapElementsAtOffset(Point, Double)

Windows.UI.Xaml.Controls.Maps.MapControl

FindMapElementsAtOffset(Point)

Windows.UI.Xaml.Controls.Maps.MapControl

GetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint)

Windows.UI.Xaml.Controls.Maps.MapControl

GetLocationFromOffset(Point, Geopoint)

Windows.UI.Xaml.Controls.Maps.MapControl

GetOffsetFromLocation(Geopoint, Point)

Windows.UI.Xaml.Controls.Maps.MapControl.GetOffsetFromLocation(Windows.Devices.Geolocation.Geopoint,Windows.Foundation.Point@)

GetPreferredSize(Size)

Overrides the base class implementation of GetPreferredSize(Size) to provide correct layout behavior for the hosted XAML content.

(Inherited from WindowsXamlHostBase)
GetUwpInternalObject()

Exposes ChildInternal without exposing its actual Type.

(Inherited from WindowsXamlHostBase)
GetVisibleRegion(MapVisibleRegionKind)

Windows.UI.Xaml.Controls.Maps.MapControl.GetVisibleRegion(Windows.UI.Xaml.Controls.Maps.MapVisibleRegionKind)

IsLocationInView(Geopoint, Boolean)

Windows.UI.Xaml.Controls.Maps.MapControl.IsLocationInView(Windows.Devices.Geolocation.Geopoint,System.Boolean@)

OnChildSizeChanged(Object, Object)

Responds to UWP XAML's 'SizeChanged' event, fired when XAML content layout has changed. If 'DesiredSize' has changed, re-run Windows Forms layout.

(Inherited from WindowsXamlHostBase)
OnHandleCreated(EventArgs)
OnHandleDestroyed(EventArgs)

Override that disposes the current instance when the parent handle has been destroyed

(Inherited from WindowsXamlHostBase)
OnPaint(PaintEventArgs)

Draw a placeholder Rectangle with 'Xaml Content' in Design mode

(Inherited from WindowsXamlHostBase)
OnPaintBackground(PaintEventArgs)

Prevent control from painting the background

(Inherited from WindowsXamlHostBase)
OnWindowXamlHostSizeChanged(Object, EventArgs)

Event handler for SizeChanged. If the size of the host control has changed, re-run Windows Forms layout on this Control instance.

(Inherited from WindowsXamlHostBase)
PreProcessMessage(Message)

In order to handle keyboard accelerators and TAB input, we must give a chance to <seealso cref="T:Windows.UI.Xaml.Hosting.DesktopWindowXamlSource"></seealso> to handle the msg using <seealso cref="M:Microsoft.Toolkit.Win32.UI.XamlHost.IDesktopWindowXamlSourceNative2.PreTranslateMessage(System.Windows.Forms.Message@)"></seealso>

(Inherited from WindowsXamlHostBase)
ProcessTabKey(Boolean)

Processes a tab key, ensuring that Xaml has an opportunity to handle the command before normal Windows Forms processing. (Xaml must be notified of keys that invoke focus navigation.)

(Inherited from WindowsXamlHostBase)
Select(Boolean, Boolean)

Activates the Windows Forms WindowsXamlHost Control

(Inherited from WindowsXamlHostBase)
SetContent(UIElement)

Sets the root UWP XAML element on DesktopWindowXamlSource

(Inherited from WindowsXamlHostBase)
StartContinuousPan(Double, Double)

Windows.UI.Xaml.Controls.Maps.MapControl.StartContinuousPan(System.Double,System.Double)

StartContinuousRotate(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.StartContinuousRotate(System.Double)

StartContinuousTilt(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.StartContinuousTilt(System.Double)

StartContinuousZoom(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.StartContinuousZoom(System.Double)

StopContinuousPan()

Windows.UI.Xaml.Controls.Maps.MapControl.StopContinuousPan

StopContinuousRotate()

Windows.UI.Xaml.Controls.Maps.MapControl.StopContinuousRotate

StopContinuousTilt()

Windows.UI.Xaml.Controls.Maps.MapControl.StopContinuousTilt

StopContinuousZoom()

Windows.UI.Xaml.Controls.Maps.MapControl.StopContinuousZoom

TryGetLocationFromOffset(Point, AltitudeReferenceSystem, Geopoint)

Windows.UI.Xaml.Controls.Maps.MapControl

TryGetLocationFromOffset(Point, Geopoint)

Windows.UI.Xaml.Controls.Maps.MapControl

TryPanAsync(Double, Double)

Windows.UI.Xaml.Controls.Maps.MapControl.TryPanAsync(System.Double,System.Double)

TryPanToAsync(Geopoint)

Windows.UI.Xaml.Controls.Maps.MapControl.TryPanToAsync(Windows.Devices.Geolocation.Geopoint)

TryRotateAsync(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.TryRotateAsync(System.Double)

TryRotateToAsync(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.TryRotateToAsync(System.Double)

TrySetSceneAsync(MapScene, MapAnimationKind)

Windows.UI.Xaml.Controls.Maps.MapControl

TrySetSceneAsync(MapScene)

Windows.UI.Xaml.Controls.Maps.MapControl

TrySetViewAsync(Geopoint, Nullable<Double>, Nullable<Double>, Nullable<Double>, MapAnimationKind)

Windows.UI.Xaml.Controls.Maps.MapControl

TrySetViewAsync(Geopoint, Nullable<Double>, Nullable<Double>, Nullable<Double>)

Windows.UI.Xaml.Controls.Maps.MapControl

TrySetViewAsync(Geopoint, Nullable<Double>)

Windows.UI.Xaml.Controls.Maps.MapControl

TrySetViewAsync(Geopoint)

Windows.UI.Xaml.Controls.Maps.MapControl

TryTiltAsync(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.TryTiltAsync(System.Double)

TryTiltToAsync(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.TryTiltToAsync(System.Double)

TryZoomInAsync()

Windows.UI.Xaml.Controls.Maps.MapControl.TryZoomInAsync

TryZoomOutAsync()

Windows.UI.Xaml.Controls.Maps.MapControl.TryZoomOutAsync

TryZoomToAsync(Double)

Windows.UI.Xaml.Controls.Maps.MapControl.TryZoomToAsync(System.Double)

UpdateDpiScalingFactor()

Sets a scaling factor based on the current dpi value on the scaling panel

(Inherited from WindowsXamlHostBase)
WndProc(Message)

Processes Windows messages for XamlContentHost control window (not XAML window)

(Inherited from WindowsXamlHostBase)

Events

Name Description
ActualCameraChanged

Windows.UI.Xaml.Controls.Maps.MapControl.ActualCameraChanged

ActualCameraChanging

Windows.UI.Xaml.Controls.Maps.MapControl.ActualCameraChanging

CenterChanged

Windows.UI.Xaml.Controls.Maps.MapControl.CenterChanged

ChildChanged

Fired when XAML content has been updated

(Inherited from WindowsXamlHostBase)
CustomExperienceChanged

Windows.UI.Xaml.Controls.Maps.MapControl.CustomExperienceChanged

HeadingChanged

Windows.UI.Xaml.Controls.Maps.MapControl.HeadingChanged

LoadingStatusChanged

Windows.UI.Xaml.Controls.Maps.MapControl.LoadingStatusChanged

MapContextRequested

Windows.UI.Xaml.Controls.Maps.MapControl.MapContextRequested

MapDoubleTapped

Windows.UI.Xaml.Controls.Maps.MapControl.MapDoubleTapped

MapElementClick

Windows.UI.Xaml.Controls.Maps.MapControl.MapElementClick

MapElementPointerEntered

Windows.UI.Xaml.Controls.Maps.MapControl.MapElementPointerEntered

MapElementPointerExited

Windows.UI.Xaml.Controls.Maps.MapControl.MapElementPointerExited

MapHolding

Windows.UI.Xaml.Controls.Maps.MapControl.MapHolding

MapRightTapped

Windows.UI.Xaml.Controls.Maps.MapControl.MapRightTapped

MapTapped

Windows.UI.Xaml.Controls.Maps.MapControl.MapTapped

PitchChanged

Windows.UI.Xaml.Controls.Maps.MapControl.PitchChanged

TargetCameraChanged

Windows.UI.Xaml.Controls.Maps.MapControl.TargetCameraChanged

TransformOriginChanged

Windows.UI.Xaml.Controls.Maps.MapControl.TransformOriginChanged

ZoomLevelChanged

Windows.UI.Xaml.Controls.Maps.MapControl.ZoomLevelChanged

Applies to