Map Class
Represents the default map class.
Namespace: Microsoft.Maps.MapControl.WPF
Assembly: Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF.dll)
Inheritance Hierarchy
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
Microsoft.Maps.MapControl.WPF.MapCore
Microsoft.Maps.MapControl.WPF.Map
Syntax
public class Map : MapCore
public ref class Map : MapCore
type Map =
class
inherit MapCore
end
Public Class Map
Inherits MapCore
Constructors
Name | Description | |
---|---|---|
Map() | Initializes a new instance of the Microsoft.Maps.MapControl.WPF.Map class. |
Properties
Name | Description | |
---|---|---|
ActualHeight | (Inherited from FrameworkElement.) |
|
ActualWidth | (Inherited from FrameworkElement.) |
|
AllowDrop | (Inherited from UIElement.) |
|
AnimationLevel | Gets or sets the animation level of the map.(Inherited from MapCore.) |
|
AreAnyTouchesCaptured | (Inherited from UIElement.) |
|
AreAnyTouchesCapturedWithin | (Inherited from UIElement.) |
|
AreAnyTouchesDirectlyOver | (Inherited from UIElement.) |
|
AreAnyTouchesOver | (Inherited from UIElement.) |
|
Background | (Inherited from Control.) |
|
BindingGroup | (Inherited from FrameworkElement.) |
|
BitmapEffect | (Inherited from UIElement.) |
|
BitmapEffectInput | (Inherited from UIElement.) |
|
BorderBrush | (Inherited from Control.) |
|
BorderThickness | (Inherited from Control.) |
|
BoundingRectangle | Gets the rectangle that defines the boundaries of the map view.(Inherited from MapCore.) |
|
CacheMode | (Inherited from UIElement.) |
|
Center | Gets the center location of the map view.(Inherited from MapCore.) |
|
Children | Gets the child elements of the map.(Inherited from MapCore.) |
|
Clip | (Inherited from UIElement.) |
|
ClipToBounds | (Inherited from UIElement.) |
|
CommandBindings | (Inherited from UIElement.) |
|
ContextMenu | (Inherited from FrameworkElement.) |
|
CredentialsProvider | Gets or sets the credentials (Bing Maps Key).(Inherited from MapCore.) |
|
Culture | Gets or sets the culture used by the map.(Inherited from MapCore.) |
|
Cursor | (Inherited from FrameworkElement.) |
|
DataContext | (Inherited from FrameworkElement.) |
|
DefaultStyleKey | (Inherited from FrameworkElement.) |
|
DependencyObjectType | (Inherited from DependencyObject.) |
|
DesiredSize | (Inherited from UIElement.) |
|
Dispatcher | (Inherited from DispatcherObject.) |
|
Effect | (Inherited from UIElement.) |
|
FlowDirection | (Inherited from FrameworkElement.) |
|
Focusable | (Inherited from UIElement.) |
|
FocusVisualStyle | (Inherited from FrameworkElement.) |
|
FontFamily | (Inherited from Control.) |
|
FontSize | (Inherited from Control.) |
|
FontStretch | (Inherited from Control.) |
|
FontStyle | (Inherited from Control.) |
|
FontWeight | (Inherited from Control.) |
|
ForceCursor | (Inherited from FrameworkElement.) |
|
Foreground | (Inherited from Control.) |
|
HandlesScrolling | (Inherited from Control.) |
|
HasAnimatedProperties | (Inherited from UIElement.) |
|
Heading | Gets or sets the directional heading of the map.(Inherited from MapCore.) |
|
Height | (Inherited from FrameworkElement.) |
|
HorizontalAlignment | (Inherited from FrameworkElement.) |
|
HorizontalContentAlignment | (Inherited from Control.) |
|
InheritanceBehavior | (Inherited from FrameworkElement.) |
|
InputBindings | (Inherited from UIElement.) |
|
InputScope | (Inherited from FrameworkElement.) |
|
IsArrangeValid | (Inherited from UIElement.) |
|
IsEnabled | (Inherited from UIElement.) |
|
IsEnabledCore | (Inherited from UIElement.) |
|
IsFocused | (Inherited from UIElement.) |
|
IsHitTestVisible | (Inherited from UIElement.) |
|
IsInitialized | (Inherited from FrameworkElement.) |
|
IsInputMethodEnabled | (Inherited from UIElement.) |
|
IsKeyboardFocused | (Inherited from UIElement.) |
|
IsKeyboardFocusWithin | (Inherited from UIElement.) |
|
IsLoaded | (Inherited from FrameworkElement.) |
|
IsManipulationEnabled | (Inherited from UIElement.) |
|
IsMeasureValid | (Inherited from UIElement.) |
|
IsMouseCaptured | (Inherited from UIElement.) |
|
IsMouseCaptureWithin | (Inherited from UIElement.) |
|
IsMouseDirectlyOver | (Inherited from UIElement.) |
|
IsMouseOver | (Inherited from UIElement.) |
|
IsSealed | (Inherited from DependencyObject.) |
|
IsStylusCaptured | (Inherited from UIElement.) |
|
IsStylusCaptureWithin | (Inherited from UIElement.) |
|
IsStylusDirectlyOver | (Inherited from UIElement.) |
|
IsStylusOver | (Inherited from UIElement.) |
|
IsTabStop | (Inherited from Control.) |
|
IsVisible | (Inherited from UIElement.) |
|
Language | (Inherited from FrameworkElement.) |
|
LayoutTransform | (Inherited from FrameworkElement.) |
|
LogicalChildren | (Inherited from FrameworkElement.) |
|
MapForegroundStyle | Gets or sets the map foreground style. |
|
Margin | (Inherited from FrameworkElement.) |
|
MaxHeight | (Inherited from FrameworkElement.) |
|
MaxWidth | (Inherited from FrameworkElement.) |
|
MinHeight | (Inherited from FrameworkElement.) |
|
MinWidth | (Inherited from FrameworkElement.) |
|
Mode | Gets or sets the map mode.(Inherited from MapCore.) |
|
ModeCrossFadeDuration | Gets or sets the duration in milliseconds that it takes to cross-fade to a new map mode when a new map mode is set. The default value is 500 milliseconds.(Inherited from MapCore.) |
|
Name | (Inherited from FrameworkElement.) |
|
Opacity | (Inherited from UIElement.) |
|
OpacityMask | (Inherited from UIElement.) |
|
OverridesDefaultStyle | (Inherited from FrameworkElement.) |
|
Padding | (Inherited from Control.) |
|
Parent | (Inherited from FrameworkElement.) |
|
PersistId | (Inherited from UIElement.) |
|
RenderSize | (Inherited from UIElement.) |
|
RenderTransform | (Inherited from UIElement.) |
|
RenderTransformOrigin | (Inherited from UIElement.) |
|
Resources | (Inherited from FrameworkElement.) |
|
ScaleVisibility | Gets or sets the visibility of all Scale objects on the map. (Inherited from MapCore.) |
|
SnapsToDevicePixels | (Inherited from UIElement.) |
|
Style | (Inherited from FrameworkElement.) |
|
StylusPlugIns | (Inherited from UIElement.) |
|
SupportedManipulations | Gets or sets the current set of supported two-dimensional (2-D) manipulations. |
|
TabIndex | (Inherited from Control.) |
|
Tag | (Inherited from FrameworkElement.) |
|
TargetCenter | Gets the pitch of the map view towards which the map is animating.(Inherited from MapCore.) |
|
TargetHeading | Gets the heading of the map view towards which the map is animating.(Inherited from MapCore.) |
|
TargetZoomLevel | Gets the zoom level of the map view towards which the map is animating.(Inherited from MapCore.) |
|
Template | (Inherited from Control.) |
|
TemplatedParent | (Inherited from FrameworkElement.) |
|
ToolTip | (Inherited from FrameworkElement.) |
|
TouchesCaptured | (Inherited from UIElement.) |
|
TouchesCapturedWithin | (Inherited from UIElement.) |
|
TouchesDirectlyOver | (Inherited from UIElement.) |
|
TouchesOver | (Inherited from UIElement.) |
|
Triggers | (Inherited from FrameworkElement.) |
|
Uid | (Inherited from UIElement.) |
|
UriScheme | Gets the protocol (http or https) that is used to request the map. |
|
UseHttps | Gets or sets whether to use HTTPS protocol when requesting a map. |
|
UseInertia | Gets or sets whether to use the inertial animation effect during map navigation. |
|
UseLayoutRounding | (Inherited from FrameworkElement.) |
|
VerticalAlignment | (Inherited from FrameworkElement.) |
|
VerticalContentAlignment | (Inherited from Control.) |
|
ViewportSize | Gets the size of the viewport.(Inherited from MapCore.) |
|
Visibility | (Inherited from UIElement.) |
|
VisualBitmapEffect | (Inherited from Visual.) |
|
VisualBitmapEffectInput | (Inherited from Visual.) |
|
VisualBitmapScalingMode | (Inherited from Visual.) |
|
VisualCacheMode | (Inherited from Visual.) |
|
VisualChildrenCount | (Inherited from FrameworkElement.) |
|
VisualClearTypeHint | (Inherited from Visual.) |
|
VisualClip | (Inherited from Visual.) |
|
VisualEdgeMode | (Inherited from Visual.) |
|
VisualEffect | (Inherited from Visual.) |
|
VisualOffset | (Inherited from Visual.) |
|
VisualOpacity | (Inherited from Visual.) |
|
VisualOpacityMask | (Inherited from Visual.) |
|
VisualParent | (Inherited from Visual.) |
|
VisualScrollableAreaClip | (Inherited from Visual.) |
|
VisualTextHintingMode | (Inherited from Visual.) |
|
VisualTextRenderingMode | (Inherited from Visual.) |
|
VisualTransform | (Inherited from Visual.) |
|
VisualXSnappingGuidelines | (Inherited from Visual.) |
|
VisualYSnappingGuidelines | (Inherited from Visual.) |
|
Width | (Inherited from FrameworkElement.) |
|
ZoomLevel | Gets or sets the zoom level.(Inherited from MapCore.) |
Methods
Events
Name | Description | |
---|---|---|
ContextMenuClosing | (Inherited from FrameworkElement.) |
|
ContextMenuOpening | (Inherited from FrameworkElement.) |
|
DataContextChanged | (Inherited from FrameworkElement.) |
|
DragEnter | (Inherited from UIElement.) |
|
DragLeave | (Inherited from UIElement.) |
|
DragOver | (Inherited from UIElement.) |
|
Drop | (Inherited from UIElement.) |
|
FocusableChanged | (Inherited from UIElement.) |
|
GiveFeedback | (Inherited from UIElement.) |
|
GotFocus | (Inherited from UIElement.) |
|
GotKeyboardFocus | (Inherited from UIElement.) |
|
GotMouseCapture | (Inherited from UIElement.) |
|
GotStylusCapture | (Inherited from UIElement.) |
|
GotTouchCapture | (Inherited from UIElement.) |
|
Initialized | (Inherited from FrameworkElement.) |
|
IsEnabledChanged | (Inherited from UIElement.) |
|
IsHitTestVisibleChanged | (Inherited from UIElement.) |
|
IsKeyboardFocusedChanged | (Inherited from UIElement.) |
|
IsKeyboardFocusWithinChanged | (Inherited from UIElement.) |
|
IsMouseCapturedChanged | (Inherited from UIElement.) |
|
IsMouseCaptureWithinChanged | (Inherited from UIElement.) |
|
IsMouseDirectlyOverChanged | (Inherited from UIElement.) |
|
IsStylusCapturedChanged | (Inherited from UIElement.) |
|
IsStylusCaptureWithinChanged | (Inherited from UIElement.) |
|
IsStylusDirectlyOverChanged | (Inherited from UIElement.) |
|
IsVisibleChanged | (Inherited from UIElement.) |
|
KeyDown | Occurs when a key is pressed while focus is on the map. |
|
KeyUp | (Inherited from UIElement.) |
|
LayoutUpdated | (Inherited from UIElement.) |
|
Loaded | (Inherited from FrameworkElement.) |
|
LoadingError | Occurs when there is an error loading the map. |
|
LostFocus | (Inherited from UIElement.) |
|
LostKeyboardFocus | (Inherited from UIElement.) |
|
LostMouseCapture | (Inherited from UIElement.) |
|
LostStylusCapture | (Inherited from UIElement.) |
|
LostTouchCapture | (Inherited from UIElement.) |
|
ManipulationBoundaryFeedback | (Inherited from UIElement.) |
|
ManipulationCompleted | (Inherited from UIElement.) |
|
ManipulationDelta | (Inherited from UIElement.) |
|
ManipulationInertiaStarting | (Inherited from UIElement.) |
|
ManipulationStarted | (Inherited from UIElement.) |
|
ManipulationStarting | (Inherited from UIElement.) |
|
ModeChanged | Occurs when the map mode changes. (Inherited from MapCore.) |
|
MouseDoubleClick | Occurs when the mouse is used to double click the map. |
|
MouseDown | (Inherited from UIElement.) |
|
MouseEnter | (Inherited from UIElement.) |
|
MouseLeave | (Inherited from UIElement.) |
|
MouseLeftButtonDown | Occurs when the left mouse button is pressed down over the map. |
|
MouseLeftButtonUp | Occurs when the left mouse button is released. |
|
MouseMove | Occurs when the mouse moves over the map.( |
|
MouseRightButtonDown | (Inherited from UIElement.) |
|
MouseRightButtonUp | (Inherited from UIElement.) |
|
MouseUp | (Inherited from UIElement.) |
|
MouseWheel | Occurs when the mouse wheel is used. |
|
PreviewDragEnter | (Inherited from UIElement.) |
|
PreviewDragLeave | (Inherited from UIElement.) |
|
PreviewDragOver | (Inherited from UIElement.) |
|
PreviewDrop | (Inherited from UIElement.) |
|
PreviewGiveFeedback | (Inherited from UIElement.) |
|
PreviewGotKeyboardFocus | (Inherited from UIElement.) |
|
PreviewKeyDown | (Inherited from UIElement.) |
|
PreviewKeyUp | (Inherited from UIElement.) |
|
PreviewLostKeyboardFocus | (Inherited from UIElement.) |
|
PreviewMouseDoubleClick | (Inherited from Control.) |
|
PreviewMouseDown | (Inherited from UIElement.) |
|
PreviewMouseLeftButtonDown | (Inherited from UIElement.) |
|
PreviewMouseLeftButtonUp | (Inherited from UIElement.) |
|
PreviewMouseMove | (Inherited from UIElement.) |
|
PreviewMouseRightButtonDown | (Inherited from UIElement.) |
|
PreviewMouseRightButtonUp | (Inherited from UIElement.) |
|
PreviewMouseUp | (Inherited from UIElement.) |
|
PreviewMouseWheel | (Inherited from UIElement.) |
|
PreviewQueryContinueDrag | (Inherited from UIElement.) |
|
PreviewStylusButtonDown | (Inherited from UIElement.) |
|
PreviewStylusButtonUp | (Inherited from UIElement.) |
|
PreviewStylusDown | (Inherited from UIElement.) |
|
PreviewStylusInAirMove | (Inherited from UIElement.) |
|
PreviewStylusInRange | (Inherited from UIElement.) |
|
PreviewStylusMove | (Inherited from UIElement.) |
|
PreviewStylusOutOfRange | (Inherited from UIElement.) |
|
PreviewStylusSystemGesture | (Inherited from UIElement.) |
|
PreviewStylusUp | (Inherited from UIElement.) |
|
PreviewTextInput | (Inherited from UIElement.) |
|
PreviewTouchDown | (Inherited from UIElement.) |
|
PreviewTouchMove | (Inherited from UIElement.) |
|
PreviewTouchUp | (Inherited from UIElement.) |
|
QueryContinueDrag | (Inherited from UIElement.) |
|
QueryCursor | (Inherited from UIElement.) |
|
RequestBringIntoView | (Inherited from FrameworkElement.) |
|
SizeChanged | (Inherited from FrameworkElement.) |
|
SourceUpdated | (Inherited from FrameworkElement.) |
|
StylusButtonDown | (Inherited from UIElement.) |
|
StylusButtonUp | (Inherited from UIElement.) |
|
StylusDown | (Inherited from UIElement.) |
|
StylusEnter | (Inherited from UIElement.) |
|
StylusInAirMove | (Inherited from UIElement.) |
|
StylusInRange | (Inherited from UIElement.) |
|
StylusLeave | (Inherited from UIElement.) |
|
StylusMove | (Inherited from UIElement.) |
|
StylusOutOfRange | (Inherited from UIElement.) |
|
StylusSystemGesture | (Inherited from UIElement.) |
|
StylusUp | (Inherited from UIElement.) |
|
TargetUpdated | (Inherited from FrameworkElement.) |
|
TargetViewChanged | Occurs when the view towards which the map is animating changes.(Inherited from MapCore.) |
|
TextInput | (Inherited from UIElement.) |
|
ToolTipClosing | (Inherited from FrameworkElement.) |
|
ToolTipOpening | (Inherited from FrameworkElement.) |
|
TouchDown | Occurs when the screen is touched over the map. |
|
TouchEnter | (Inherited from UIElement.) |
|
TouchLeave | (Inherited from UIElement.) |
|
TouchMove | Occurs when the screen is touched and dragged to move the map. |
|
TouchUp | Occurs when the touch of the map on the screen finishes. |
|
Unloaded | (Inherited from FrameworkElement.) |
|
ViewChangeEnd | Occurs when the view is done changing.(Inherited from MapCore.) |
|
ViewChangeOnFrame | Occurs for every frame of a view change.(Inherited from MapCore.) |
|
ViewChangeStart | Occurs when the view starts changing.(Inherited from MapCore.) |
Explicit Interface Implementations
Name | Description | |
---|---|---|
IQueryAmbient.IsAmbientPropertyAvailable(String) | (Inherited from FrameworkElement.) |
Remarks
Use the Microsoft.Maps.MapControl.WPF.MapCore.Mode property to set the map view to Aerial, Road (default) or AerialWithLabels.
Examples
<Window x:Class="WPFTestApplication.MainWindow"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF">
<Grid x:Name="LayoutRoot" Background="White">
<m:Map CredentialsProvider="INSERT_YOUR_BING_MAPS_KEY" Mode=”AerialWithLabels” Center="37.806029,-122.407007" ZoomLevel="16"/>
</Grid>
</Window>
//Set the map mode to Aerial with labels
myMap.Mode = new AerialMode(true);
'Set the map mode to Aerial with labels
myMap.Mode = New AerialMode(True)
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
RoadMode
AerialMode
Microsoft.Maps.MapControl.WPF Namespace
Understanding Map Views
Return to top