MapStyleSheet Class

Definition

Represents a set of rules that define the style of the map in a map control. This class provides methods to:

  1. Retrieve common base map styles.
  2. Load custom sheets through ParseFromJson and TryParseFromJson. To learn more about JSON style sheets, see Map stylesheet reference.
  3. Combine multiple sheets, where later sheets override earlier sheets, using the Combine method. Usually a common base map style is be combined with custom JSON to create a customized map style.
public ref class MapStyleSheet sealed : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MapStyleSheet final : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MapStyleSheet : DependencyObject
Public NotInheritable Class MapStyleSheet
Inherits DependencyObject
Inheritance
Object Platform::Object IInspectable DependencyObject MapStyleSheet
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Properties

Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)

Methods

Aerial()

Gets a MapStyleSheet that presents an aerial view of the map.

AerialWithOverlay()

Gets a MapStyleSheet that presents a hybrid map that combines an aerial map with roads.

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
Combine(IIterable<MapStyleSheet>)

Combines the rules defined in two MapStyleSheet instances.

GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
ParseFromJson(String)

Creates a stylesheet by parsing a JSON markup string that defines a set of custom rules.

ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
RoadDark()

Gets a MapStyleSheet that presents a road map with a dark theme.

RoadHighContrastDark()

Gets a MapStyleSheet styles the map with a high contrast dark theme.

RoadHighContrastLight()

Gets a MapStyleSheet styles the map with a high contrast light theme.

RoadLight()

Gets a MapStyleSheet that presents a road map with a light theme.

SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
TryParseFromJson(String, MapStyleSheet)

Creates stylesheet by parsing a JSON markup string that defines a set of custom rules.

UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to