I'd like to use a ColorEditor in a DropdownButton,
can you tell me how to prevent the dropdownbutton close when i move sliders...
i'd like to be able to select the right value for each slider before dropdowncontent close.
maybe with a "apply" button ?
thanks
Aurore
6 Answers, 1 is accepted
Could you please try setting the KeepOpen property of the DropDownButton to true ? This should prevent the DropDownContent from closing untill you click on the button. Please let us know if this satisfies you.
Kind regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I probably can try, but user still need to click twice to apply the same color for 2 different objects.
Aurore
Could you please elaborate more on your exact scenario? This will be highly appreciated and we will be better able to advice you. Thank you in advance,
All the best,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
let suppose that instead of having one object on your grid you have several objects :
<
ToggleButton
Margin
=
"10"
Click
=
"ToggleButton_Click"
Grid.Row
=
"1"
>
<
Rectangle
x:Name
=
"oRect"
Width
=
"50"
Height
=
"50"
Fill
=
"AliceBlue"
/>
</
ToggleButton
>
<
ToggleButton
Margin
=
"10"
Click
=
"ToggleButton_Click"
Grid.Row
=
"2"
>
<
Rectangle
x:Name
=
"oRect1"
Width
=
"50"
Height
=
"50"
Fill
=
"AliceBlue"
/>
</
ToggleButton
>
<
ToggleButton
Margin
=
"10"
Click
=
"ToggleButton_Click"
Grid.Row
=
"3"
>
<
Rectangle
x:Name
=
"oRect2"
Width
=
"50"
Height
=
"50"
Fill
=
"AliceBlue"
/>
</
ToggleButton
>
<
ToggleButton
Margin
=
"10"
Click
=
"ToggleButton_Click"
Grid.Row
=
"4"
>
<
Rectangle
x:Name
=
"oRect3"
Width
=
"50"
Height
=
"50"
Fill
=
"AliceBlue"
/>
</
ToggleButton
>
When you select one, (click on one togglebutton), choose a color (green).
After you select an other one, and try to choose the same color (green) : it is not possible in one click. If i use "keepopen", the user must click outside colorpicker to apply choosen clor, i don't think it is a good idea.
private
void
PredefSelectedColorChanged(
object
sender, EventArgs e)
{
if
(oBtnSelected !=
null
)
{
((Rectangle)oBtnSelected.Content).Fill =
new
SolidColorBrush(((RadColorSelector)sender).SelectedColor);
color.IsOpen =
false
;
}
}
ToggleButton oBtnSelected =
null
;
private
void
ToggleButton_Click(
object
sender, RoutedEventArgs e)
{
oBtnSelected = sender
as
ToggleButton;
}
Aurore
I have mixed two of my questions about colorpicker...
The response i've made this morning is for clearing selectedcolor : (http://www.telerik.com/community/forums/wpf/colorpicker/clear-selectedcolor.aspx).
Please accept my apologizes...
Well, the only problem i've seen by using KeepOpen attribute is that for the colorpicker tab, i want that the dropdown button close after one click.
Thanks for your ideas
Aurore
is it possible for you to share your XAML and your exact user scenarios - the steps that the user should perform (for example 1.create color, 2.1. clicking outside the popup should close the button 3. While creating color , the popup stays open and etc). This will be the best way for use to get into your scenario quicker and find an optimal solution. Thank you in advance.
Kind regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>