Close BackstageView on button press

7 posts, 0 answers
  1. David
    David  avatar
    66 posts
    Member since:
    Aug 2010

    Posted 30 Jan 2012 Link to this post

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

    Posted 31 Jan 2012 Link to this post

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

  3. UI for WinForms is Visual Studio 2017 Ready
  4. David
    David  avatar
    66 posts
    Member since:
    Aug 2010

    Posted 01 Feb 2012 Link to this post

    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
  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 03 Feb 2012 Link to this post

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

  6. Alain
    Alain avatar
    6 posts
    Member since:
    Jan 2012

    Posted 14 Feb 2012 Link to this post

    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
  7. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 17 Feb 2012 Link to this post

    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 >>
  8. Christ
    Christ avatar
    7 posts
    Member since:
    Feb 2011

    Posted 07 Sep Link to this post

    Thanks for this, works for me!

     

    Best,

    Christ Hagenaars

Back to Top
UI for WinForms is Visual Studio 2017 Ready