Contextual Tabs

4 posts, 0 answers
  1. John Hodgson
    John Hodgson avatar
    8 posts
    Member since:
    Sep 2009

    Posted 11 Oct 2011 Link to this post

    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
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 14 Oct 2011 Link to this post

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

  3. UI for WPF is Visual Studio 2017 Ready
  4. John Hodgson
    John Hodgson avatar
    8 posts
    Member since:
    Sep 2009

    Posted 14 Oct 2011 Link to this post

    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
  5. Viktor Tsvetkov
    Admin
    Viktor Tsvetkov avatar
    382 posts

    Posted 14 Oct 2011 Link to this post

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

Back to Top