I would prefer the method for ArcGIS Desktop described here:
Symbols and renderers—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
But I cannot make it work in ArcGis PRO.
Instead I use the following code:
<SPAN class="keyword token">var</SPAN> uniqueValueRendererDef <SPAN class="operator token">=</SPAN> <SPAN class="token function">GetUniqueValueRendererDef</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> uniqueValueRenderer <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>CIMUniqueValueRenderer<SPAN class="punctuation token">)</SPAN>deltaLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CreateRenderer</SPAN><SPAN class="punctuation token">(</SPAN>uniqueValueRendererDef<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> classes <SPAN class="operator token">=</SPAN> uniqueValueRenderer<SPAN class="punctuation token">.</SPAN>Groups<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>Classes<SPAN class="punctuation token">;</SPAN>
uniqueValueRendererDef <SPAN class="operator token">=</SPAN> <SPAN class="token function">GetUniqueValueRendererDef</SPAN><SPAN class="punctuation token">(</SPAN>classes<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
uniqueValueRenderer <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>CIMUniqueValueRenderer<SPAN class="punctuation token">)</SPAN>deltaLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CreateRenderer</SPAN><SPAN class="punctuation token">(</SPAN>uniqueValueRendererDef<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
deltaLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SetRenderer</SPAN><SPAN class="punctuation token">(</SPAN>uniqueValueRenderer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="keyword token">private</SPAN> UniqueValueRendererDefinition <SPAN class="token function">GetUniqueValueRendererDef</SPAN><SPAN class="punctuation token">(</SPAN>CIMUniqueValueClass<SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> classes <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">string</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> fields <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN> Model<SPAN class="punctuation token">.</SPAN>DbFieldOperation<SPAN class="punctuation token">.</SPAN>Key <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//field to be used to retrieve unique values</SPAN>
CIMMultiLayerSymbol symbol <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">switch</SPAN> <SPAN class="punctuation token">(</SPAN>DeltaLayer<SPAN class="punctuation token">.</SPAN>ShapeType<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="keyword token">case</SPAN> esriGeometryType<SPAN class="punctuation token">.</SPAN>esriGeometryPolygon<SPAN class="punctuation token">:</SPAN>
symbol <SPAN class="operator token">=</SPAN> SymbolFactory<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ConstructPolygonSymbol</SPAN><SPAN class="punctuation token">(</SPAN>
ColorFactory<SPAN class="punctuation token">.</SPAN>GreyRGB<SPAN class="punctuation token">,</SPAN> SimpleFillStyle<SPAN class="punctuation token">.</SPAN>Solid<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">CIMSolidStroke</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
Width <SPAN class="operator token">=</SPAN> <SPAN class="number token">3.0</SPAN><SPAN class="punctuation token">,</SPAN>
Color <SPAN class="operator token">=</SPAN> <SPAN class="comment token">//CIMColor.CreateRGBColor(0, 0, 0, 127)</SPAN>
ColorFactory<SPAN class="punctuation token">.</SPAN>BlackRGB
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">break</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">var</SPAN> symbolTemplate <SPAN class="operator token">=</SPAN> symbol<SPAN class="punctuation token">.</SPAN><SPAN class="token function">MakeSymbolReference</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> colorRamp <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">CIMFixedColorRamp</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>classes <SPAN class="operator token">==</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
colorRamp<SPAN class="punctuation token">.</SPAN>Colors <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="punctuation token">{</SPAN> ColorFactory<SPAN class="punctuation token">.</SPAN>RedRGB<SPAN class="punctuation token">,</SPAN> ColorFactory<SPAN class="punctuation token">.</SPAN>GreenRGB <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">else</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> colors <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">List</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">foreach</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">var</SPAN> cls <SPAN class="keyword token">in</SPAN> classes<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">switch</SPAN> <SPAN class="punctuation token">(</SPAN>cls<SPAN class="punctuation token">.</SPAN>Label<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="keyword token">case</SPAN> <SPAN class="string token">"DELETE"</SPAN><SPAN class="punctuation token">:</SPAN>
colors<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Add</SPAN><SPAN class="punctuation token">(</SPAN>DeltaLayer<SPAN class="punctuation token">.</SPAN>ShapeType <SPAN class="operator token">==</SPAN> esriGeometryType<SPAN class="punctuation token">.</SPAN>esriGeometryPolygon
<SPAN class="operator token">?</SPAN> ColorFactory<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CreateRGBColor</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">255</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">128</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">:</SPAN> ColorFactory<SPAN class="punctuation token">.</SPAN>RedRGB<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">break</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">default</SPAN><SPAN class="punctuation token">:</SPAN>
colors<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Add</SPAN><SPAN class="punctuation token">(</SPAN>ColorFactory<SPAN class="punctuation token">.</SPAN>GreyRGB<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">break</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
colorRamp<SPAN class="punctuation token">.</SPAN>Colors <SPAN class="operator token">=</SPAN> colors<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToArray</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">var</SPAN> uniqueValueRendererDef <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">UniqueValueRendererDefinition</SPAN><SPAN class="punctuation token">(</SPAN>fields<SPAN class="punctuation token">,</SPAN> symbolTemplate<SPAN class="punctuation token">,</SPAN> colorRamp<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">return</SPAN> uniqueValueRendererDef<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Explanation: The first call to GetUniqueValueRendererDef() in line 2 is to obtain the unique values (in line 4.)
The second call in line 5 produces the desired ColorRamp. The efect was described in my question:
How to use ColorFactory to produce transparent colors for a ColorRamp?
I cannot simply produce an universal color ramp with 3 (or more) colors because the renter allocates for the second and subsequent values random colors from the ramp when the ramp contains more colors than unique values!
This is inconvenient - I would call it a bug!
Now, the real problem in this post:
For Polynomial Layers I need transparent symbols - this I have already described in the above question.
However, in line 21 I have also asked for a stroke (solid black - although my first preference was transparent as well) 3 units tick.
Not only the stroke does not come, but neither can be added with the symbol editor!
Look at the effect when using a SimpleFillStyle.Vertical filling (line 21)

The cyan rectangle is the selected polygon, but there are 2 polygons there and without stroke line it is impossible to make the difference. Obviously, any king of filling won't replace the transparency on the symbol, but missing strokes makes thinks even worse!
The Format Polygon Symbol dialog shoes:

The solid stroke checkbox came unchecked - why?
When manually checking it, I can see what I want!

(Much better!)