prevent dropdown close

7 posts, 0 answers
  1. Aurore
    Aurore avatar
    58 posts
    Member since:
    Nov 2007

    Posted 29 Nov 2011 Link to this post

    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
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 01 Dec 2011 Link to this post

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

  3. DevCraft banner
  4. Aurore
    Aurore avatar
    58 posts
    Member since:
    Nov 2007

    Posted 01 Dec 2011 Link to this post

    Hi Petar,

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

    Aurore
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 05 Dec 2011 Link to this post

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

  6. Aurore
    Aurore avatar
    58 posts
    Member since:
    Nov 2007

    Posted 05 Dec 2011 Link to this post

    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
  7. Aurore
    Aurore avatar
    58 posts
    Member since:
    Nov 2007

    Posted 05 Dec 2011 Link to this post

    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
  8. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Dec 2011 Link to this post

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

Back to Top
DevCraft banner