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

Ribbon Bar BackStage View Exception

1 Answer 104 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Any
Top achievements
Rank 1
Any asked on 15 Jun 2011, 02:34 PM
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.








1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 20 Jun 2011, 03:24 PM
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()
{
    InitializeComponent();
    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.

Regards,
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.
Tags
RibbonBar
Asked by
Any
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or