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

Contextual Tabs

3 Answers 119 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
John Hodgson
Top achievements
Rank 2
John Hodgson asked on 11 Oct 2011, 02:19 PM
I have a contextual tab, which I show using

Contextualgroup.IsActive = true;

This has the effect of displaying the tab and changing the current active tab, which is very annoying.  I was under the impression that this was against Microsoft's guidelines.  If you draw a rectangle in PowerPoint 2010 the Format tab appears, but the active tab remains on whatever you had selected.

Is there a way to simulate the same functionality?  I have tried IsVisible, but that seems to be just a getter.

Thanks
John

3 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 14 Oct 2011, 07:03 AM
Hello John Hodgson,

 You can set the IsSelected = true to the tab you want to be selected after all. (You can also use the ribbon.SelectedItem property). In my opinion most of the times when you need a contextual tab it should be selected when it gets activated.
Please let me know if you have further issues. 

Greetings,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
John Hodgson
Top achievements
Rank 2
answered on 14 Oct 2011, 09:01 AM
Hi Miro,

Thanks for your reply, however I don't agree with the answer.  Firstly, I couldn't get it to work and secondly it would mean a lot more programming just to replicate what I think should be default behaviour.

I took a look at the Microsoft Ribbon Licence document, which states that the contextual tab must not become selected when you are selecting an existing object.  If creating a new object then the contextual tab should become selected.  I have marked the sections in the extract below.

1116 1. Contextual Tabs MUST be available when the user selects an existing object in the document, **but the
1117 Contextual Tabs MUST NOT become selected. The currently selected tab MUST continue to be selected in
1118 the Ribbon**. This behavior is different from selecting the Contextual Tabs when a new object is inserted
1119 (as described in the section above). (Note in the figure below the Picture Tools Contextual Tab is available
1120 when the picture is selected in the document, but that the Picture Tools Contextual Tab is not selected.
1121 **The Home Tab continues to be selected in the Ribbon when the user selects the picture in the document.**)

Best Regards
John
0
Viktor Tsvetkov
Telerik team
answered on 14 Oct 2011, 12:51 PM
Hi John Hodgson,

Please accept our apologies for the caused inconvenience, but this is the behavior that we have assumed as default for the contextual groups. For the coming Q3 Beta release of our controls we will add a property called SelectFirstTabOnActivation which will be boolean and will determine whether the selection should be changed on activation of a contextual group (the default value will be true), so you will be able to use it and easily achieve what you want. Until the Beta release you can use the PreviewSelectionChanged event of the RadRibbonView and add your custom logic in order to prevent the selection.

All the best,
Viktor Tsvetkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RibbonView and RibbonWindow
Asked by
John Hodgson
Top achievements
Rank 2
Answers by
Miro Miroslavov
Telerik team
John Hodgson
Top achievements
Rank 2
Viktor Tsvetkov
Telerik team
Share this question
or