You ask me to explain my requirements further and you say: "While the particular RibbonTab visibility is collapsed, the first RibbonTab will get selected. "
My requirements are to make a certain ribbon tab normally invisible (collapsed) but in a certain context (user selection of a particular page in the application) this tab to become both visible and selected. When I say "selected" I mean as if the tab was always visible and the user clicked on this tab.
My application has 3 ribbon tabs: "Schematic" (visible), "Model" (visible) and "Chart" (normally collapsed). Ideally I want the "Chart" tab to become both visible and the currently selected tab in a certain context (see Q3 below) but so far I've only managed to make this work using explicit code.
Images #1. "Chart" tab Visibility is Collapsed. Tab and its contents are invisible and the first ("Schematic") tab is shown. Correct.
Image #2. "Chart" tab Visibility set to Visible and IsChecked set to true. The "Chart" tab and its contents are now the currently selected tab. Correct.
Image #3. "Chart" tab Visibility set back to Collapsed. The tab label is invisible but the tab contents remain visible and selected. It does not behave like your statement above. As far as I can tell the extra step required is to set IsChecked = true on some other tab.
So my followup questions are:
1. Is the "Visibility" property supposed to only affect the tab label and not the tab contents (as I find above)?
2. Is the "IsChecked" property the correct way to select (make current) a particular tab in code?
2. Do you have any examples of the use of the ContextTabGroup? This feels like what I should be using but the one page of documentation on this is completely lacking on what it does or how to use it.