RadRibbonDropDownButton VS RadDropDownButton - One ignores "StaysOpen" property?

3 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 12 Jul 2011 Link to this post

    I have the following code:
    <Grid x:Name="LayoutRoot" Background="White">
              
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
              
        <telerik:RadDropDownButton Content="RDDB" Grid.Column="0"> <!-- KeepOpen="True" -->
            <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadContextMenu StaysOpen="True">
                    <telerik:RadMenuItem Header="1" IsCheckable="True" />
                    <telerik:RadMenuItem Header="2" IsCheckable="True" IsChecked="True" />
                    <telerik:RadMenuItem Header="3" IsCheckable="True" />
                </telerik:RadContextMenu>
            </telerik:RadDropDownButton.DropDownContent>
         </telerik:RadDropDownButton>
          
        <telerik:RadRibbonDropDownButton Content="RRDDB" Grid.Column="1"> <!-- KeepOpen="True" -->
            <telerik:RadRibbonDropDownButton.DropDownContent>
                <telerik:RadContextMenu StaysOpen="True">
                    <telerik:RadMenuItem Header="1" IsCheckable="True" />
                    <telerik:RadMenuItem Header="2" IsCheckable="True" IsChecked="True" />
                    <telerik:RadMenuItem Header="3" IsCheckable="True" />
                </telerik:RadContextMenu>
            </telerik:RadRibbonDropDownButton.DropDownContent>
        </telerik:RadRibbonDropDownButton>
              
    </Grid>


    When you run this sample, notice that the "RadDropDownButton" will keep the context menu visible (allowing the user to check more than one item) and not close the popup until the user clicks away or on the button again.  The "RadRibbonDropDownButton" seems to ignore the "StaysOpen" property of the context menu and closes the popup everytime a click is made either on the context menu or away from it.

    Is there a reason for this?  I found the "KeepOpen" property on both the "RadDropDownButton" and the "RadRibbonDropDownButton" but that is not suitable for my case.  I would like the context menu to close if the user clicks either the button or somewhere else on the screen.  The "KeepOpen" property seems to force the user to click on the button again to close the menu (which lets them have multiple context menus open which isn't good for me)...
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 15 Jul 2011 Link to this post

    Hi Rob,

    The RadRibbonDropDownButton ignores the StaysOpen property due to the design guidelines we were following while implementing RadRibbonBar. That's why we have RadRibbonDropDownButton and RadDropDownButton. Is there a particular reason why you are not willing to use the RadDropDownButton because it seems it fits your scenario perfectly. If it is a matter of styling I'll be glad to assist you with that. Let me know how I can be of further assistance.

    Greetings,
    Kiril Stanoev
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 15 Jul 2011 Link to this post

    Thanks Kiril - I've tried to stay away from the regular buttons and use only the ribbon buttons because we were running into issues closing the collapsed ribbon groups in our toolbars.  For this particular case, I'll work around it and use the RadDropDownButton.
     
    Thanks for your help.
Back to Top