We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Handling MDI inside ribbon

Hi,

I'm trying to add MDI buttons (minimize, restore, close) to my ribbon application.

I've thought of using TabPanelItem but I only been able to add one button to it.

I've managed to add those buttons under the RibbonTab but not near the RibbonTab.

1. How I can add those buttons?
2. How I can add new MDI windows? (I want to add a new window with a button).

Regards,

Dov.



5 Replies

PB Priyanga Balasubramaniam Syncfusion Team January 6, 2016 01:00 PM UTC

Hi Dov,

Thank you for using Syncfusion products.

Query#1:"How I can add those buttons?"

More Buttons can be added to TabPanelItem by using ButtonPanel. For more information please refer the following code sample.
<syncfusion:Ribbon.TabPanelItem>
<syncfusion:ButtonPanel Name="BtnPannel">
<syncfusion:RibbonButton Name="Minimize" ToolTip="Button1" SizeForm="Small" Click="Button1_Click" Label="Minimize"/>
<syncfusion:RibbonButton Name="Restore" ToolTip="Button2" SizeForm="Small" Click="Button2_Click" Label="Maximize"/>
<syncfusion:RibbonButton Name="Close" ToolTip="Button3" SizeForm="Small" Click="Button3_Click" Label="Close"/>
</syncfusion:ButtonPanel>
</syncfusion:Ribbon.TabPanelItem>


Query#2:"How I can add new MDI windows? (I want to add a new window with a button)"?

In RibbonWindow we do not have a support for adding child windows. We have support for creating MDI window in our DocumnetContainer and DockingManager. Can you please share more information about your requirement clearly. This will help us to proceed further.

Regards,
Priyanga B


DO Dov January 6, 2016 03:36 PM UTC

Thank it's working great.

As for query 2, I want to create a new MDI window under DockingManager so that whenever a user press on a button a new window is created.

Regards,

Dov.


PB Priyanga Balasubramaniam Syncfusion Team January 7, 2016 10:23 AM UTC

Hi Dov,

Thank you for your update.

We have prepared a simple sample using DockingManager with MDI mode inside the RibbonWindow. In our Ribbon control we do not have MDI support to open child windows like DockingManager. Can you please check the below sample and let us know whether the sample meets your requirement.

Sample: Sample


Regards,
Priyanga B


DO Dov January 7, 2016 11:13 AM UTC

Thank you for your reply,

Can I open child window under DocumnetContaine?

Sadly the sample not helping me, I need to be able to open several child windows in my ribbon application, each child window will contain an SfChart. Is there any way to do that?

Thanks once again for all your help.

PS

Is there a code behind for the MDI window close, minimize, resize buttons?
I would like change the visibility of the TabPanelItem buttons according to the MDI window state, so that if the MDI window is not maximized the buttons in the TabPanelItem will not be shown (just like it shows in the GIF I sent in my the previous comment).

Dov.


PB Priyanga Balasubramaniam Syncfusion Team January 8, 2016 04:05 PM UTC

Hi Dov,

We have prepared the sample which tries to meet your requirement. In this sample we have used DocumentContainer in MDI mode inside the RibbonWindow. In Ribbon control we have added buttons in TabPannelItem. These button commands binded with DocumentContainer Minimize, Maximize and Restore buttons and Visibility of those three buttons are maintained as per the MDI window state.

Please download the sample from the below location.

Sample: Sample

Regards,
Priyanga B

Loader.
Up arrow icon