title: Coloring a Polygon
body: <p>I want to Color a Polygon...</p>
  
  <p>This is the Polygon in my Compass.xaml:</p>
  
  <pre><code>&lt;Polygon x:Name="arrow"  Points="5, 90 35, 90 35, 160 65, 160 65, 90 95, 90 50, 5" Stroke="Black" StrokeThickness="4" Fill="White" Margin="42,32,184,0" Grid.Column="1" Grid.ColumnSpan="2" Height="163" VerticalAlignment="Top"&gt;
      &lt;Polygon.RenderTransform&gt;
          &lt;RotateTransform x:Name="rotateArrow" Angle="0"  CenterX="50" CenterY="160" /&gt;
      &lt;/Polygon.RenderTransform&gt;
  &lt;/Polygon&gt;
  </code></pre>
  
  <p>And this is where I get the Color from:</p>
  
  <pre><code>Channel lbi = (Channel) GlobalVariables.ChannelList[Channelindex];
  
  lbi.Color =&gt; "0xED1C24"
  </code></pre>
  
  <p>Now i have to fill this Polygon with this Color...</p>
  
  <p>I tried to do it with </p>
  
  <pre><code>arrow.fill('blue'); 
  </code></pre>
  
  <p>(Just random color to try out if it would work.) but it didn't work...</p>
  
  <p>Can somebody help me out?   </p>
  
  <p>EDIT:</p>
  
  <p>Ok it works now.</p>
  
  <pre><code>string[] colorsplit = currentChannel.Color.Split('x');
  arrow.Fill = GetColorFromHexa("#FF"+colorsplit[1]);
  </code></pre>
  
  <p>the Problem was that I didn't knew that i have to put #FF in front of the string..</p>