Create a custom ribbon

Dear community members,

I have been looking through the API documentation but could not find information on how to create a custom ribbon. Is this not possible or did I look at the wrong place?

I have created a new view and I would like to create a custom "Home" ribbon for this new view. If this is not possible, is there any way to display the "Add-Ins" ribbon by default instead of the "View" one. I could then use the "Add-ins" ribbon to add my groups and actions.

Thanks in advance for your support.

I wish a merry Christmas and a happy new year to the whole community!

Regards,

Laurent

Parents Reply Children
  • Hi Laurent,

    Sorry, I misread the question in my initial reply (I read it to mean a custom tab in an existing view)! I'm glad Daniel Brockman brought up the Qualitative plug-in, as you *can* make custom home tabs for views.

    In order to make your "Home" tab for your custom view, you need to do the following:

       [RibbonGroup("MyRibbonGroup")]

       [RibbonGroupLayout(LocationByType = typeof(TranslationStudioDefaultRibbonTabs.HomeRibbonTabLocation))]

       class MyRibbonGroup : AbstractRibbonGroup

       {

       }

       [Action("MyAction", typeof(MyView))]

       [ActionLayout(typeof(MyRibbonGroup))]

       public class MyAction : AbstractViewControllerAction<MyView>

       {

          ...

       }

     

    I am assuming "MyView" is your custom view. The key here is the following two lines:

       [Action("MyAction", typeof(MyView))]

       [ActionLayout(typeof(MyRibbonGroup))]

    The first line "typeof(MyView)" associates your action with your view, so it only appears when you switch to your view.

    The second line "(typeof(MyRibbonGroup)" associates the action with your custom ribbon group.

  • Dear Jesse, dear Daniel,

    Thanks for your reply and your help. It works as expected... and it is logic too, when you look closer to it. The Home ribbon is part of the Studio default ribbon tabs collection, which by default, applies to all Studio views... It is just not displayed because it is empty.

    Regards,

    Laurent