protected internal override void UpdateLayoutBasedOnColor() { if (_fromMovement || SelectedHueColor == null) { return; } base.UpdateLayoutBasedOnColor(); var hsv = Color.GetHSV(); if (ColorSlider != null) { _adjustingColor = true; ColorSlider.Color = ColorSpace.GetColorFromHueValue((int)hsv.Hue); _adjustingColor = false; } _position.X = hsv.Saturation * SelectedHueColor.ActualWidth; _position.Y = (1 - hsv.Value) * SelectedHueColor.ActualHeight; SetSampleLocation(); }
private void SetColorFromSlider(double value) { _fromSliderChange = true; ColorChanging(ColorSpace.GetColorFromHueValue((int)value % 360)); _fromSliderChange = false; }