This is a migrated thread and some comments may be shown as answers.

prevent dropdown close

6 Answers 71 Views
ColorEditor
This is a migrated thread and some comments may be shown as answers.
Aurore
Top achievements
Rank 1
Aurore asked on 29 Nov 2011, 04:57 PM
Hello,

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

Sort by
0
Petar Mladenov
Telerik team
answered on 01 Dec 2011, 10:45 AM
Hi Aurore,

 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 >>

0
Aurore
Top achievements
Rank 1
answered on 01 Dec 2011, 10:57 AM
Hi Petar,

I probably can try, but user still need to click twice to apply the same color for 2 different objects.

Aurore
0
Petar Mladenov
Telerik team
answered on 05 Dec 2011, 08:40 AM
Hi 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 >>

0
Aurore
Top achievements
Rank 1
answered on 05 Dec 2011, 09:01 AM
ok,

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
0
Aurore
Top achievements
Rank 1
answered on 05 Dec 2011, 05:02 PM
oups,
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
0
Petar Mladenov
Telerik team
answered on 07 Dec 2011, 04:21 PM
Hi 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 >>

Tags
ColorEditor
Asked by
Aurore
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Aurore
Top achievements
Rank 1
Share this question
or