WPF Ribbon Tab view in Designer
Asked Answered
S

3

11

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?

Stafani answered 6/12, 2010 at 3:9 Comment(2)
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?Dossal
Any solution for Contextual Tabs?Spittoon
N
16

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" />
Noteworthy answered 6/12, 2010 at 21:32 Comment(1)
For Fluent.Ribbon the member is SelectedTabIndex="0"Glyphography
P
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" ...
Phobe answered 6/12, 2010 at 8:31 Comment(1)
It's terrible that the designer works this way, previously it didn't.Dossal
B
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.

Bifrost answered 20/7, 2016 at 16:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.