SpectrumColorPicker SelectedColorChanged-Event

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 7 years ago by P. Chwoika - Inosoft GmbH
Version: 12.1.0560
Avatar

Hello,

I am using your SpectrumColorPicker from your Shared Library.

I subscribed to the SelectedColorChanged-Event which is raised every time the user selects a new color in the SpectrumColorPicker. Unfortunately, the event is only raised when the user releases the mouse button and the color selection is completed.

Is it possible to get change notifications of the current color, when the user clicks into the color spectrum and drags around with the mouse?

 

Thanks for your help.

[Modified 7 years ago]

Comments (3)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Pascal,

The SpectrumSlice.MarkedColor property returns the color that is currently under the mouse when a drag is occuring.  It is possible to bind to that to know when the user is dragging with the mouse and is over different colors.  The SpectrumColorPicker control uses the SpectrumSlice control in its template but unfortunately the outer control doesn't expose that value itself.  So you'd need to either use the slice control separately or would somehow have to walk the visual tree to find the slice control instance within the SpectrumColorPicker's template and then bind to its MarkedColor property.


Actipro Software Support

Posted 7 years ago by P. Chwoika - Inosoft GmbH
Avatar

Hello!

Thanks for your quick answer. I can use the SpectrumSlice.MarkedColor property to get the color that is currently under the mouse when a drag is occurring :) That works great for a SolidColorBrush.

But I also use your GradientBrushSlider in combination with the SpectrumColorPicker. Is it possible to refresh the SelectedBrush property of the GradientBrushSlider when the user clicks into the color spectrum and drags around with the mouse?

I would need a GradientBrush from the GradientBrushSlider which considers the color that is currently under the mouse when a drag is occurring.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Pascal,

Unfortunately not at this time without a code update.  We have sealed off new feature code updates at the moment since we're prepping to launch 2012.2 as soon as we can.  But I'll mark this down as something we'll try to address for you in a maintenance release.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 13 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.