Hi Guys,
I'm using XamColorPicker to apply background color on ActiveCell of XamDataGrid.
The behaviour is - XamColorPicker is applying the color, to the ActiveCell of the xamdatagrid, on MouseOver on colors in XamColorPicker, rather I want the color to applied on Click of color from XamColorPicker and not mouseover,This should be the appropriate behaviour which i'm looking for.
I hope the situation is clear.
Kindly Help,
Thanks,
Arun
UI interaction dictates that you NEED two events. If I use a calendar control, my date isnt selected until I click it, why would anyone want to select a color on mouse over.
If anything, dont have mouseover do anything, you dont get to change what the term selected means.
Selected = "hard color selection"
Hello Tarun,
I believe that this behavior is expected, because when you click the Advanced button the DropDownClosing event fires and you set the color. Then you select a new color, but this time the DropDownClosing event doesn't fire. The thing you can do is to handle the XamColorPicker's SelectedColorChanged and use a flag to determine whether the drop down was fired and if it was then in the SelectedColorChanged event you can set the color.
Hope this helps you.
Hey Stefan,
Thanks a lot, it worked, but now again a problem.
When i pick color from Advanced Editor option. it doesn't change the color.
Now what should i do for this.
You can use a Dispatcher in the XamColorPicker's DropDownClosing event handler in order to get the correct color like this:
Dispatcher.BeginInvoke(new Action(() => { //(sender as XamColorPicker).SelectedColor }), System.Windows.Threading.DispatcherPriority.Background, null);
Hello Kress,
I am handling the dropdownclosing event but when setting my control's color to colorpicker's selected color it also create problem.
works ok if i choose some color from color picker but if i only hover some colors and click outside the color picker, its dropdownclosing event calls and it bind the last hoverd color from colorpicker (because the selected color is still the last hovered color).
what should i do now?