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

Dismissing the MinimizedPopup

4 Answers 85 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Trang
Top achievements
Rank 1
Trang asked on 25 Apr 2012, 11:04 PM
Hi,

When the RadRibbonView.IsMinimized is set to true the ribbon is minimized. Clicking on a tab opens a popup to display the group and items.  Is there a way to dismiss the popup when a user clicks on an item in the tab, similar to the behavior in Microsoft's ribbon? Currently, only when the user clicks outside of the tab, the popup will go away and return to the minimized ribbon state.  I found the RadRibbonView.IsMinimizedPopupOpen, but this property cannot be set.  Any ideas?

Thanks,
Trang

4 Answers, 1 is accepted

Sort by
0
Viktor Tsvetkov
Telerik team
answered on 26 Apr 2012, 02:41 PM
Hello Trang,

Could you please try these lines of code:
var popup = ribbon.ChildrenOfType<Popup>().FirstOrDefault();
if (popup != null)
{
   popup.IsOpen = false;
}
and tell me if this works for you?

Regards,
Viktor Tsvetkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Trang
Top achievements
Rank 1
answered on 27 Apr 2012, 05:58 AM
Hi Viktor,

Thank you for your help.  I was able to do what I needed.  I did notice that even when the ribbon is minimized and the popup is open, the popup.IsOpen would be false.  I had to set it to true and then back to false to force it to close.

Thanks,
Trang
0
Viktor Tsvetkov
Telerik team
answered on 01 May 2012, 09:33 AM
Hi Trang,

Please accept my apologies for misleading you in my previous post, actually you need to get the second child popup so could you try using:
var popup = ribbon.ChildrenOfType<Popup>().LastOrDefault();
instead of:
var popup = ribbon.ChildrenOfType<Popup>().FirstOrDefault();


All the best,
Viktor Tsvetkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Trang
Top achievements
Rank 1
answered on 01 May 2012, 05:32 PM
Thank you Viktor. This approach works much better.
Tags
RibbonView and RibbonWindow
Asked by
Trang
Top achievements
Rank 1
Answers by
Viktor Tsvetkov
Telerik team
Trang
Top achievements
Rank 1
Share this question
or