Browse Source

ColorCanvas: fixed bug when selecting black or white the color spectrum slider would jump to red.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
4e1640b562
  1. 4
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs

4
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs

@ -324,7 +324,9 @@ namespace Microsoft.Windows.Controls
_currentColorPosition = null;
HsvColor hsv = ColorUtilities.ConvertRgbToHsv(color.R, color.G, color.B);
_spectrumSlider.Value = hsv.H;
if (color.R != color.G && color.R != color.B)
_spectrumSlider.Value = hsv.H;
Point p = new Point(hsv.S, 1 - hsv.V);

Loading…
Cancel
Save