Share via


MercatorMode.ModeBackground Property

 

Specifies whether the background is light or dark.

Namespace:   Microsoft.Maps.MapControl.WPF
Assembly:  Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF.dll)

Syntax

public override ModeBackground ModeBackground { get; }
public:
property ModeBackground ModeBackground {
    virtual ModeBackground get() override;
}
override ModeBackground : ModeBackground with get
Public Overrides ReadOnly Property ModeBackground As ModeBackground

Property Value

Type: Microsoft.Maps.MapControl.WPF.Core.ModeBackground

Returns ModeBackground.

Remarks

You can use the MercatorMode to remove the base map tile layer so that you can add tile overlays, shapes, images or videos to one or more MapLayer objects.

Examples

The following example removes the base map tile layer.

<Window x:Class="MapControlInteractiveSdk.Tutorials.TileLayer.TutorialNoBaseTiles"
    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" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

        <m:Map CredentialsProvider="{StaticResource MyCredentials}" Center="48.03,-122.4" ZoomLevel="13" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="MyMap">
            <!-- Set the MapMode to show no base tiles -->
            <m:Map.Mode>
                <m:MercatorMode/>
            </m:Map.Mode>
        </m:Map>
    </Grid>
</Window>

See Also

MercatorMode Class
Microsoft.Maps.MapControl.WPF Namespace

Return to top