Click or drag to resize

LineSymbolColor Property

Gets or sets the line symbol color

Namespace:  Esri.ArcGISRuntime.Symbology
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
public Color Color { get; set; }

Property Value

Type: Color

When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a lack of consensus Empty is reported. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.



Example Name: ChangeFeatureLayerRenderer

Change the appearance of a feature layer with a renderer.

Code example screen shot.

// Copyright 2016 Esri.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using System;
using System.Windows;
using System.Drawing;

namespace ArcGISRuntime.WPF.Samples.ChangeFeatureLayerRenderer
        name: "Change feature layer renderer",
        category: "Layers",
        description: "Change the appearance of a feature layer with a renderer.",
        instructions: "Use the buttons to change the renderer on the feature layer. The original renderer displays orange circles, the diameters of which are proportional to carbon storage of each tree. When the blue renderer in this sample is applied, it displays the location of the trees simply as blue points.",
        tags: new[] { "feature layer", "renderer", "visualization" })]
    public partial class ChangeFeatureLayerRenderer
        // Create and hold reference to the feature layer
        private FeatureLayer _featureLayer;

        public ChangeFeatureLayerRenderer()

            // Setup the control references and execute initialization 

        private void Initialize()
            // Create new Map with basemap
            Map myMap = new Map(BasemapStyle.ArcGISTopographic);

            // Create and set initial map area
            Envelope initialLocation = new Envelope(
                -1.30758164047166E7, 4014771.46954516, -1.30730056797177E7, 4016869.78617381,

            // Set the initial viewpoint for map
            myMap.InitialViewpoint = new Viewpoint(initialLocation);

            // Provide used Map to the MapView
            MyMapView.Map = myMap;

            // Create uri to the used feature service
            Uri serviceUri = new Uri(

            // Initialize feature table using a url to feature server url
            ServiceFeatureTable featureTable = new ServiceFeatureTable(serviceUri);

            // Initialize a new feature layer based on the feature table
            _featureLayer = new FeatureLayer(featureTable);

        private void OnOverrideButtonClicked(object sender, RoutedEventArgs e)
            // Create a symbol to be used in the renderer
            SimpleLineSymbol symbol = new SimpleLineSymbol()
                Color = Color.Blue,
                Width = 2,
                Style = SimpleLineSymbolStyle.Solid

            // Create a new renderer using the symbol just created
            SimpleRenderer renderer = new SimpleRenderer(symbol);

            // Assign the new renderer to the feature layer
            _featureLayer.Renderer = renderer;

        private void OnResetButtonClicked(object sender, RoutedEventArgs e)
            // Reset the renderer to default
<UserControl x:Class="ArcGISRuntime.WPF.Samples.ChangeFeatureLayerRenderer.ChangeFeatureLayerRenderer"
             d:DesignHeight="300" d:DesignWidth="300">
        <esri:MapView x:Name="MyMapView"/>
        <Border Style="{StaticResource BorderStyle}">
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                <Button Content="Reset" 
                        Margin="0,0,5,0" Grid.Column="0"
                        Click="OnResetButtonClicked" />
                <Button Content="Override" 
                        Margin="5,0,0,0" Grid.Column="1"
See Also
Additional Examples
Hyperlink to ExampleDescription
ChangeFeatureLayerRendererChange the appearance of a feature layer with a renderer.
SketchOnMapUse the Sketch Editor to edit or sketch a new point, line, or polygon geometry on to a map.