title: WIndows Forms Host Background buggy
body: <p>I am having an issue with the WinFormsHost control in my WPF application.</p>
  
  <p>I didn't know to to describe it 100% by myself so I made a video to help me:</p>
  
  <p><a href="https://youtu.be/KpcWdPCmahI" rel="nofollow noreferrer" title="Youtube Video">https://youtu.be/KpcWdPCmahI</a></p>
  
  <p>Whenever I try to set a <code>Brush</code> whose <code>Color.Value.A</code> property's value is 255 (FF in hex) to the Background property of my WinFormsHost, the color is reverted immediately.</p>
  
  <p>In other words you may know the <code>Colors.White</code> would return a <code>Color</code> with the value <code>#FFFFFFFF</code>. The background would revert back to the previous color went attempting to set this.</p>
  
  <p>However if I set the <code>Color</code>'s A (Alpha value to 254 aka <code>#FEFFFFFF</code> The color is set without reverting to it's previous color.</p>
  
  <p>I wrote this to try and work around this weird behavior (working right now)</p>
  
  <pre><code>private void ColorPicker_SelectionChanged(object sender, RoutedPropertyChangedEventArgs&lt;Color?&gt; e)
  {
      Brush brush;
      if (e.NewValue == null) return;
      if (e.NewValue.Value.A == 255)
      {
          var color = Color.FromArgb((byte) (e.NewValue.Value.A - 1), e.NewValue.Value.R, e.NewValue.Value.G,
              e.NewValue.Value.B);
          brush = new SolidColorBrush(color);
          ((ColorPicker) sender).SelectedColor = color;
      }
      else
      {
          brush = new SolidColorBrush((Color)e.NewValue);
      }
      WindowHostControl.Background = brush;
  }
  </code></pre>