<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: need working example for polygon feature layer symbol with primitiveOverrides in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605729#M13465</link>
    <description>&lt;P&gt;&amp;gt;&lt;SPAN&gt;Is this functionality supposed to be working in ESRI ArcGIS Runtime?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;ArcGIS Maps SDK for Native Apps currently does not support primitiveOverrides. There is some support to honor them but is limited to DictionaryRenderer using military standards like mil2525d etc.&amp;nbsp;&lt;BR /&gt;We already have this feature on priority list for near future release, but there isn't a definitive timeline yet. I will add your case to our internal issue and will keep you updated as we make progress on this feature.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Apr 2025 17:39:39 GMT</pubDate>
    <dc:creator>PreetiMaske</dc:creator>
    <dc:date>2025-04-14T17:39:39Z</dc:date>
    <item>
      <title>need working example for polygon feature layer symbol with primitiveOverrides</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605713#M13464</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;We are using ESRI ArcGIS Runtime in a .NET csproj. We use the following nugets:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&amp;lt;PackageReference Include="Esri.ArcGISRuntime" Version="200.7.0" /&amp;gt;
&amp;lt;PackageReference Include="Esri.ArcGISRuntime.Toolkit.WPF" Version="200.7.0" /&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to create a FeatureLayer with Polygon Symbols, and with each Polygon UI being controlled by attributes on the feature. We are mainly looking to control - the width of the polygon line, the color of the polygon line and the fill color of the polygon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We create our feature table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;//polygon as feature

List&amp;lt;Field&amp;gt; zoneFields = new List&amp;lt;Field&amp;gt;();
Field zoneNameField = Field.CreateString("name", null, 50);
zoneFields.Add(zoneNameField);
Field zoneLineColorField = new Field(FieldType.Text, "linecolor", null, 50);
zoneFields.Add(zoneLineColorField);
Field zoneFillColorField = new Field(FieldType.Text, "fillcolor", null, 50);
zoneFields.Add(zoneFillColorField);
Field zoneLineWidthField = Field.CreateDouble("linewidth");
zoneFields.Add(zoneLineWidthField);
Field zoneFillWidthField = new Field(FieldType.Float64, "fillwidth", null, 0);
zoneFields.Add(zoneFillWidthField);

_zoneFeatureTable = new FeatureCollectionTable(zoneFields, GeometryType.Polygon, SpatialReferences.Wgs84);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the JSON for the CIMSymbol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const string zoneFeatureJSON = """
{
    "type": "CIMSymbolReference",
    "symbol": {
        "type": "CIMPolygonSymbol",
        "primitiveName": "lineoverride",
        "symbolLayers": [
        {
            "type": "CIMSolidStroke",
            "primitiveName": "lineoverride",
            "enable": true,
            "capStyle": "Round",
            "joinStyle": "Round",
            "lineStyle3D": "Strip",
            "miterLimit": 10,
            "width": 1,
            "color": [
            0,
            0,
            0,
            255
            ]
        },
        {
            "type": "CIMHatchFill",
            "enable": true,
            "lineSymbol": {
            "type": "CIMLineSymbol",
            "symbolLayers": [
                {
                "type": "CIMSolidStroke",
                "primitiveName": "lineoverride",
                "enable": true,
                "capStyle": "Round",
                "joinStyle": "Round",
                "lineStyle3D": "Strip",
                "miterLimit": 10,
                "width": 1,
                "color": [
                    0,
                    0,
                    0,
                    255
                ]
                }
            ]
            },
            "rotation": 45,
            "separation": 5
        }
        ],
        "animations": []
    },
    "primitiveOverrides": [{
        "type": "CIMPrimitiveOverride",
        "primitiveName": "lineoverride",
        "propertyName": "Width",
        "valueExpressionInfo": {
            "type": "CIMExpressionInfo",
            "title": "linetitle",
            "name": "linename",
            "expression": "$feature.linewidth",
            "returnType": "Default"
        }
        }]
    }
""";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We create the Symbol and Renderer using the JSON:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;            var zoneSymbol = Symbol.FromJson(zoneFeatureJSON);
            _zoneFeatureTable.Renderer = new SimpleRenderer(zoneSymbol);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We create a Feature using the FeatureTable:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var zoneFeature = _zoneFeatureTable.CreateFeature();
zoneFeature.SetAttributeValue(zoneNameField, $"ZoneFeature1");
zoneFeature.SetAttributeValue(zoneLineColorField, "#0000FF");
zoneFeature.SetAttributeValue(zoneFillColorField, "#FF0000");
zoneFeature.SetAttributeValue(zoneLineWidthField, 5.0);
zoneFeature.SetAttributeValue(zoneFillWidthField, 2.0);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The issue is that the Symbol does NOT use the value of "linewidth" from Feature for the override.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In this particular case, I would expect it to use the value of 5.0 from the Feature. But it still uses the default of 1.0 from the Symbol JSON.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this functionality supposed to be working in ESRI ArcGIS Runtime?&lt;/P&gt;&lt;P&gt;If it works, can you point me to a working example, so that I can see what I am doing wrong (or please point what we are doing wrong).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 16:47:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605713#M13464</guid>
      <dc:creator>ssadish</dc:creator>
      <dc:date>2025-04-14T16:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: need working example for polygon feature layer symbol with primitiveOverrides</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605729#M13465</link>
      <description>&lt;P&gt;&amp;gt;&lt;SPAN&gt;Is this functionality supposed to be working in ESRI ArcGIS Runtime?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;ArcGIS Maps SDK for Native Apps currently does not support primitiveOverrides. There is some support to honor them but is limited to DictionaryRenderer using military standards like mil2525d etc.&amp;nbsp;&lt;BR /&gt;We already have this feature on priority list for near future release, but there isn't a definitive timeline yet. I will add your case to our internal issue and will keep you updated as we make progress on this feature.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 17:39:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605729#M13465</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2025-04-14T17:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: need working example for polygon feature layer symbol with primitiveOverrides</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605744#M13466</link>
      <description>&lt;P&gt;Thank you so much for the super fast response.&lt;/P&gt;&lt;P&gt;Eagerly waiting for this to be implemented.&lt;/P&gt;&lt;P&gt;Have a great day.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 18:07:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1605744#M13466</guid>
      <dc:creator>ssadish</dc:creator>
      <dc:date>2025-04-14T18:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: need working example for polygon feature layer symbol with primitiveOverrides</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1606561#M13473</link>
      <description>&lt;P&gt;You could probably achieve something close to this using UniqueValueRenderer or ClassBreaksRenderer, as long as the number of unique combinations isn't too great.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 16:34:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-working-example-for-polygon-feature-layer/m-p/1606561#M13473</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2025-04-16T16:34:08Z</dc:date>
    </item>
  </channel>
</rss>

