I'm using "Microsoft Ribbon for WPF" and creating multiple RibbonTab. I cannot figure out a way to view/focus different tabs in the designer and it by default show the "Home" tab. To see design/xaml changes I made to tabs other than the "Home" tab, I have to debug the project every time and click through the tabs, which is not very convenient. Or I can command out the tab xaml I want to to ignore. Anyone body out there has a solution?
Asked
Active
Viewed 3,896 times
10

StayOnTarget
- 11,743
- 10
- 52
- 81

KMC
- 19,548
- 58
- 164
- 253
-
Can't believe that this is so bad. A designer that you can't design with. Who in Microsoft decided that the xaml designer should have less functionality than Winforms? Are Microsoft setting out to make software that is worse that what they used to make? – Paul McCarthy Aug 30 '18 at 13:05
-
Any solution for Contextual Tabs? – dvdhns Aug 01 '19 at 15:05
3 Answers
14
You can also use the SelectedIndex property on the Ribbon to set which tab is the currently selected tab (0 being the first tab, 1 being the second, etc.)
<ribbon:Ribbon SelectedIndex="0" />

Gene Merlin
- 882
- 7
- 5
6
The only way I have found is to set the Selector.IsSelected property to true. This will cause the tab to become visible at design time.
<ribbon:RibbonTab Selector.IsSelected="True" ...

janemann
- 113
- 1
- 5
-
It's terrible that the designer works this way, previously it didn't. – Paul McCarthy May 31 '22 at 08:14
0
I can't confirm this is working right now because my preview in general is not working properly, but this works in general in WPF when trying to hide something at design time only.
Include the namespace for blend
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Then in the element you want to hide use d:IsHidden="True"
. This will only affect design time, which eliminates the problem of forgetting to change the selected index to the correct value before building.

Adam
- 1,825
- 1
- 17
- 24