Layer.Enabled Property
Determines whether the Layer is enabled or not.
Syntax
public System.Boolean Enabled { get; set; }
Property Value
Default: true
True to enable the layer; otherwise, False.
Remarks
If this property is False then the layer will not be drawn when updating the map. If it is True the Condition, MinScale and MaxScale properties are used to determine whether the layer layer is drawn.
This property can be read or modified from any thread without taking the configuration lock.
Example
// Disable the layer
public static void DisableLayer(Layer layer)
{
layer.Enabled = false;
}
Platforms
Windows, Linux, Android