Color Picker opening

Posted 21 days ago by Avatar Antoine Picard


I was thinking about something, what about opening the color picker when you click on the little square displaying the actual color ?

When my grid is really wide and I have multiple consecutive color Pickers, it's a bit hard to find the correct button to click on. 

It would be easier if I could click on the display square.

Would it be possible ?

Comments (4)

Posted 21 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Antoine,

I'm not sure we're going to add that since it's a bit non-standard behavior-wise, but you could always set the IsEditable property to false.  When that is false, clicking anywhere on the control will open the popup because it acts like a non-editable ComboBox at that point.  Perhaps that would yield a better user experience in your scenario?

Or alternatively, you could possibly handle the PreviewMouseDown event and watch for a click on the left 20 or so pixels of the control.  Then set the control's IsPopupOpen property to true in that scenario.

Actipro Software Support
Posted 14 days ago by Antoine Picard

Hi !

I think it's a really standard behavior but anyway.

I still need to be able to edit the hexa value so IsEditable = false doesn't solve my problem.

I handled the PreviewMouseDown event without watching for a specific spot and it worked for the whole edit box but the displaying square. It correctly goes through the event, the colorEditBox.IsPopupOpen = true is triggered but nothing happens.

Posted 12 days ago by Actipro Software Support - Cleveland, OH, USA


I believe what happens here is that if you don't also mark e.Handled = true, the click may get processed by an ancestor ScrollViewer, which could steal focus and trigger the popup to close immediately.  Give that a try to see if it helps.

Actipro Software Support
Posted 11 days ago by Antoine Picard

Hi !

You were right ! Thanks a lot !

Information The latest build of this product (2018.1 build 0674) was released 4 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.

Set the number of votes that you'd like to apply to this idea. You have 10 of 10 votes available.

0 supporters, with an average vote of 0.00.