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

CommandBarStrip right click hide

6 Answers 258 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
Joe Sugden
Top achievements
Rank 1
Joe Sugden asked on 09 Dec 2010, 05:07 PM
Hello,

We want to disable the feature where the user can right-click a strip and hide it by clicking it.
See screenshot for more details.

Thanks in advance.

6 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 09 Dec 2010, 10:20 PM
Hi Joe,

Oddly, I haven't yet found a way to get rid of these right click menus, but I will keep looking. In the meantime, you could always stretch the CommandStripElement so the area is not available to click on.

CommandBarStripElement1.StretchHorizontally = True

Hope this helps. I'll get back to you if/when I find a solution.
Richard
0
Joe Sugden
Top achievements
Rank 1
answered on 09 Dec 2010, 11:14 PM
Thanks, that works for now.
0
Richard Slade
Top achievements
Rank 2
answered on 09 Dec 2010, 11:25 PM
Glad that helps Joe. I've been looking for some time now. It seems quite tricky to actually remove these items.
All the best
Richard
0
Peter
Telerik team
answered on 15 Dec 2010, 03:24 PM
Hi,

Thank you for the feedback.

We will provide a better way to handle this behavior with property or events in the upcoming SP1 release
scheduled for this week.

I hope this helps.

All the best,
Peter
the Telerik team
Get started with RadControls for WinForms with numerous videos and detailed documentation.
0
Graeme Lynch
Top achievements
Rank 1
answered on 25 Mar 2011, 05:30 PM
I was wondering if there is an option somewhere to now disable this right click functionality.

I have tried changing the customize context menu option so that it is not enabled and not visible but still I get the pop up.
Stretching the strip bar does not matter as a right mouse on a command bar icon seems to do the same thing.
0
Accepted
Ivan Todorov
Telerik team
answered on 30 Mar 2011, 03:45 PM
Hello Graeme Lynch,

You can disable the customize menu of a RadCommandBar by subscribing and canceling the DropDownOpening event of its menu:
//...
radCommandBar1.CustomizeContextMenu.DropDownOpening += new CancelEventHandler(CustomizeContextMenu_DropDownOpening);
//...
 
void CustomizeContextMenu_DropDownOpening(object sender, CancelEventArgs e)
{
    e.Cancel = true;
}

As to the customize menu opening on a right click even on a command bar icon, this issue has appeared in the latest release and will be address in the upcoming SP1.

I hope you find this useful. Feel free to ask if you have any additional questions.

Regards,
Ivan Todorov
the Telerik team
Tags
CommandBar
Asked by
Joe Sugden
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Joe Sugden
Top achievements
Rank 1
Peter
Telerik team
Graeme Lynch
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or