<?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 Create Swatch in ArcGIS Pro in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877561#M5503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm curious if there is any way in Pro 2.2 to create a Swatch for a given symbol, like you can do today with the &lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_Symbology_Symbol_CreateSwatchAsync_1.htm"&gt;WPF Runtime SDK&lt;/A&gt;. I didn't see anything obvious&amp;nbsp;when inspecting the various CIM* symbol classes or in the Pro SDK API reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wanting to use the symbols the user has specified for certain layers in a WPF UI of my own creation for a consistent look and feel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2018 18:54:19 GMT</pubDate>
    <dc:creator>DanielRouleau</dc:creator>
    <dc:date>2018-07-26T18:54:19Z</dc:date>
    <item>
      <title>Create Swatch in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877561#M5503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm curious if there is any way in Pro 2.2 to create a Swatch for a given symbol, like you can do today with the &lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_Symbology_Symbol_CreateSwatchAsync_1.htm"&gt;WPF Runtime SDK&lt;/A&gt;. I didn't see anything obvious&amp;nbsp;when inspecting the various CIM* symbol classes or in the Pro SDK API reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wanting to use the symbols the user has specified for certain layers in a WPF UI of my own creation for a consistent look and feel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 18:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877561#M5503</guid>
      <dc:creator>DanielRouleau</dc:creator>
      <dc:date>2018-07-26T18:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create Swatch in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877562#M5504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While not ideal, there is at least one work around... ArcGIS.Desktop.Editing.Templates.EditingTemplate contains Task&amp;lt;ImageSource&amp;gt; GeneratePreviewAsync(int width, int height) which will generate a swatch.&amp;nbsp; So the process would be three fold.&lt;/P&gt;&lt;P&gt;a) Generate a layer rendered with the symbol you want. (maybe you already have one though)&lt;/P&gt;&lt;P&gt;b) Generate a template that falls into that renderer class (again might already have one).&lt;/P&gt;&lt;P&gt;c) Get the preview off that template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course a utility that generated a swatch from a symbol directly would be preferred.(edit. see Charlie's reply on SymbolStyleItem)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2018 16:09:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877562#M5504</guid>
      <dc:creator>JohnJones</dc:creator>
      <dc:date>2018-07-27T16:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create Swatch in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877563#M5505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&amp;nbsp;you need a SymbolStyleItem. The property in question is "&lt;A href="http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic12320.html" rel="nofollow noopener noreferrer" target="_blank"&gt;PreviewImage&lt;/A&gt;" (inherited from StyleItem).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So....given a symbol....how do you use a SymbolStyleItem to preview it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; CIMSymbol symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; si &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SymbolStyleItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; symbol&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PatchHeight &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;64&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PatchWidth &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;64&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; si&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PreviewImage&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a good topic for a snippet. I'll make sure one gets added.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877563#M5505</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2021-12-12T11:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create Swatch in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877564#M5506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This seems to be of 'common' interest, so I added sample code to cover some of the renders here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/GetSymbolSwatch"&gt;https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/GetSymbolSwatch&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 00:17:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877564#M5506</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2018-08-09T00:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Swatch in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877565#M5507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all of the great support, that sample code is exactly what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 21:12:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-swatch-in-arcgis-pro/m-p/877565#M5507</guid>
      <dc:creator>DanielRouleau</dc:creator>
      <dc:date>2018-08-23T21:12:38Z</dc:date>
    </item>
  </channel>
</rss>

