<?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 SimpleFillSymbol with LinearGradientBrush in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/simplefillsymbol-with-lineargradientbrush/m-p/160377#M688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For our application we're using a LinearGradientBrush for the Fill property of a SimpleFillSymbol, with different A values in the colour at various points of the gradient, giving us different amounts of transparency at different places in the brush.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works fine when UseAcceleratedDisplay is set false, but when UseAcceleratedDisplay is true, the alpha channel of the colours is ignored, and the brush is solid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to get the accelerated graphics to honour the alpha channel of different points in the brush, or am I stuck with non-accelerated graphics unless I can find another way of achieving the same effect?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code extract:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
System.Windows.Media.LinearGradientBrush br = new System.Windows.Media.LinearGradientBrush();
SimpleFillSymbol symbol = new SimpleFillSymbol();
symbol.BorderBrush = null;
symbol.BorderThickness = 1;
System.Windows.Media.Color pointColour = underlayColour.Color;
System.Windows.Media.GradientStopCollection gs = new System.Windows.Media.GradientStopCollection();
for (int i = 0; i &amp;lt; count; ++i)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; pointColour.A = data&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; gs.Add(new System.Windows.Media.GradientStop(pointColour, (double)i / (double)count));
}
br.GradientStops = gs;
symbol.Fill = br;
&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Nov 2013 12:40:26 GMT</pubDate>
    <dc:creator>AndrewBrown3</dc:creator>
    <dc:date>2013-11-12T12:40:26Z</dc:date>
    <item>
      <title>SimpleFillSymbol with LinearGradientBrush</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/simplefillsymbol-with-lineargradientbrush/m-p/160377#M688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For our application we're using a LinearGradientBrush for the Fill property of a SimpleFillSymbol, with different A values in the colour at various points of the gradient, giving us different amounts of transparency at different places in the brush.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works fine when UseAcceleratedDisplay is set false, but when UseAcceleratedDisplay is true, the alpha channel of the colours is ignored, and the brush is solid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to get the accelerated graphics to honour the alpha channel of different points in the brush, or am I stuck with non-accelerated graphics unless I can find another way of achieving the same effect?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code extract:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
System.Windows.Media.LinearGradientBrush br = new System.Windows.Media.LinearGradientBrush();
SimpleFillSymbol symbol = new SimpleFillSymbol();
symbol.BorderBrush = null;
symbol.BorderThickness = 1;
System.Windows.Media.Color pointColour = underlayColour.Color;
System.Windows.Media.GradientStopCollection gs = new System.Windows.Media.GradientStopCollection();
for (int i = 0; i &amp;lt; count; ++i)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; pointColour.A = data&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; gs.Add(new System.Windows.Media.GradientStop(pointColour, (double)i / (double)count));
}
br.GradientStops = gs;
symbol.Fill = br;
&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 12:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/simplefillsymbol-with-lineargradientbrush/m-p/160377#M688</guid>
      <dc:creator>AndrewBrown3</dc:creator>
      <dc:date>2013-11-12T12:40:26Z</dc:date>
    </item>
  </channel>
</rss>

