Browse Source

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

import/raw
brianlagunas_cp 16 years ago
parent
commit
7dd8fa69f1
  1. 4
      Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorCanvas/Implementation/ColorCanvas.cs

4
Main/Source/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