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

Close BackstageView on button press

6 Answers 210 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 30 Jan 2012, 05:10 PM
Hi,

I'm using the RadRibbon Form and i have set ApplicationMenuStyle to BackstageView I have added a ListBox on a Tab and when I double click an item in it I want to load a file and show the main form.

I can load the file fine but the BackstageView does not close. How do i get the BackstageView to close?

thanks

6 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 31 Jan 2012, 12:42 PM
Hello David,

Thank you for writing.

If I understand correctly, you have added a list box to BackstageView of RadRibbonBar and upon double clicking some of the list box items, you are opening another form and at this moment you want the ribbon to change the selected tab from backstage to another one. If this is the case, you can simply set the IsSelected property of the desired tab. Attached you can find a sample application demonstrating this approach.

Let me know how this works for you.
 
All the best,
Stefan
the Telerik team

SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

0
David
Top achievements
Rank 2
answered on 01 Feb 2012, 11:15 AM
Hi,

sorry i think there has been a misunderstanding.

What I want to do is when the item is double clicked I want the menu to close. For example in Excel 2010 when I open the menu and double click the blank work book the menu closes. At the moment when I double click the item you then need to click on the menu button again to close the menu.

hope this makes it clear

thanks
0
Stefan
Telerik team
answered on 03 Feb 2012, 01:02 PM
Hi David,

Thank you for the clarification and please excuse me for the misunderstanding.

Please consider the following code snippet, which demonstrates how to close the backstage view, when item is double clicked:
void radListControl1_DoubleClick(object sender, EventArgs e)
{
    RadListVisualItem item = radListControl1.ElementTree.GetElementAtPoint(radListControl1.ListElement.PointFromScreen(MousePosition)) as RadListVisualItem;
    if (item != null)
    {
        radRibbonBar1.BackstageControl.Hide();
        RadMessageBox.Show("Hello");
    }
}

Please let me know how this works for you.
 
Regards,
Stefan
the Telerik team

SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

0
Alain
Top achievements
Rank 2
answered on 14 Feb 2012, 06:21 PM
Hello,

This is good to hide the backstage. But when I want to show it again, I have to click twice on the StartMenu Button.

I found that RadRibbonBarBackstageView1.HidePopup() also clears the StartApplicationMenu Button.

This was my solution...

Alain
0
Stefan
Telerik team
answered on 17 Feb 2012, 12:29 PM
Hi Alain,

Thank you for writing.

Indeed, you are right about this behavior. I have logged it in PITS and we will investigate it. Feel free to add your vote for this issue here: http://www.telerik.com/support/pits.aspx#/public/winforms/9756.

I have updated your Telerik point for pointing this out.

All the best,
Stefan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Christ
Top achievements
Rank 2
answered on 07 Sep 2016, 07:00 AM

Thanks for this, works for me!

 

Best,

Christ Hagenaars

Tags
RibbonBar
Asked by
David
Top achievements
Rank 2
Answers by
Stefan
Telerik team
David
Top achievements
Rank 2
Alain
Top achievements
Rank 2
Christ
Top achievements
Rank 2
Share this question
or