Ribbon Bar BackStage View Exception

2 posts, 0 answers
  1. Any
    Any avatar
    1 posts
    Member since:
    Jun 2011

    Posted 15 Jun 2011 Link to this post

    I am using Telerik Ribbon on my Application's Main Form. which I call from the Login Form within a Separate Thread (i.e. I start a thread, and within that thread, I load Main Form) using Application.Run(new frmMain()). On Main Form's Load Event, I am selecting a tab of Back Stage View dynamically. using following code

    mainRibbon.BackstageControl.SelectedItem = bsvTabAccount;
    mainRibbon.BackstageControl.ShowPopup(new System.Drawing.Point(0, 56), mainRibbon.RibbonBarElement);

    My problem is, if I hit Enter key on back stage view, application throws exception which states,

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.WinControls.UI.BackstageViewElement.ProcessKeyboardSelection(Keys keyCode)
       at Telerik.WinControls.UI.RadRibbonBarBackstageView.OnKeyDown(KeyEventArgs e)
       at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
       at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Note: Exception does not appear if I click any tab of back stage view before I press Enter key.

    Any help would be highly appreciated.

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 20 Jun 2011 Link to this post

    Hello Any One,

    Thank you for contacting us.

    Indeed, this is an issue in RadRibbonBar's backstage view. It will be addressed in some of the future releases. I have added this issue to PITS so you can subscribe for it and track its updates. Here you can find the PITS Issue: Public URL

    For the time being, you can use the following approach as a workaround:

    public Form1()
        FieldInfo field = typeof(BackstageViewElement).GetField("currentItem", BindingFlags.NonPublic | BindingFlags.Instance);
        field.SetValue(this.radRibbonBarBackstageView1.BackstageElement, new BackstageButtonItem());

    Your Telerik points have been updated for reporting this issue.

    I hope you find this helpful.

    Ivan Todorov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. DevCraft banner
Back to Top