Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:58:59+00:00 2026-05-25T05:58:59+00:00

I’m using Prism with the Microsoft WPF Ribbon, and everything works quite well, but

  • 0

I’m using Prism with the Microsoft WPF Ribbon, and everything works quite well, but I have a problem with contextual tabs. I define the contextual tabs in my Shell.xaml:

<Ribbon:Ribbon.ContextualTabGroups>
    <Ribbon:RibbonContextualTabGroup Header="CTG1" Visibility="Visible" Background="Red" />
    <Ribbon:RibbonContextualTabGroup Header="CTG2" Visibility="Visible" Background="Blue" />
    <Ribbon:RibbonContextualTabGroup Header="CTG3" Visibility="Visible" Background="Purple" />
    <Ribbon:RibbonContextualTabGroup Header="CTG4" Visibility="Visible" Background="Green" />
    <Ribbon:RibbonContextualTabGroup Header="CTG5" Visibility="Visible" Background="Orange" />
    <Ribbon:RibbonContextualTabGroup Header="CTG6" Visibility="Visible" Background="Violet" />
</Ribbon:Ribbon.ContextualTabGroups>

This way in my modules I can refer to those contextual tab groups and it works great. But I would like to define the contextualtabgroups in the modules. I thought of defining a region:

<Ribbon:Ribbon.ContextualTabGroups x:Name="RibbonContextualTabs" prism:RegionManager.RegionName="RibbonContextualTabs" />

And then in my module I would have a UserControl that inherited RibbonContextualTabGroup for each one and register those with the region… Is there a way to just define a usercontrol with some ContextualTabGroups and add them as a whole? For example:

<Ribbon:RibbonContextualTabContainer x:Class="Views.ContextualTabsView"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:Ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary">
    <Ribbon:RibbonContextualTabGroup Header="CTG1" Visibility="Visible" Background="Red" />
    <Ribbon:RibbonContextualTabGroup Header="CTG2" Visibility="Visible" Background="Blue" />
    <Ribbon:RibbonContextualTabGroup Header="CTG3" Visibility="Visible" Background="Purple" />
</Ribbon:RibbonContextualTabContainer>

as ContextualTabsView.xaml and in my module make a

_regionManager.RegisterViewWithRegion("RibbonContextualTabs", typeof (ContextualTabsView));

I don’t know if I made myself clear of what I’m trying to accomplish, but I would appreciate any help.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T05:58:59+00:00Added an answer on May 25, 2026 at 5:58 am

    Some time ago i faced the same problem (but i was using the Teleriks Ribbon Bar). I couldn’t find any way to add tabs from the modules, or at less from XAML.

    What i did was a service like this:

    public class RibbonService
    {
        public PrioritySet<RibbonTab> Tabs { get; private set; }
        public PrioritySet<object> QuickAccess { get; private set; }
        public PrioritySet<ContextualGroup> ContextualGroup { get; private set; }
    }
    

    this clases has the following structure:

    diagram for the clases above

    The key here is the class PrioritySet, to make it simpler, it is just a collection where each item has a priority asociated.

    Now if a service like this is registered on your framework, then from the modules you could add the Tabs. Remember that your shell project needs to get the RibbonService and then bind the collection of items to the Tabs property – note that PrioritySet implements INotifyCollectionChanged, so if the ribbon is binded it’s items will be updated automatically.

    Also with this you could get some intresting stuff, as composing the tabs from the service. For example one module may need to add only one button to the ribbon, this could be easily done doing

    _ribbonService.Tabs.Add(new RibbonButton(){Header = "Button", Icon = new Uri("icon.png")})
    

    In my app, i have Tabs > Groups > Buttons so every module has full control over the Ribbon. Note also that from the modules you could add all the items that you want, but the module can’t remove an item from the ribbon aat less it have a reference to it, or be the one that created it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I have thousands of HTML files to process using Groovy/Java and I need to
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.