WPF Ribbon Tab in the designer

I use "Microsoft Ribbon for WPF" and create some RibbonTab. I can’t understand the way to view / focus the various tabs in the designer and by default display the "Home" tab. To see the design changes / xaml, I made tabs different from the "Home" tab, I have to debug the project every time and click on the tabs, which is not very convenient. Or I can specify the xaml tab that I want to ignore. Does any body have a solution?

+7
wpf ribbon ribboncontrolslibrary
source share
3 answers

You can also use the SelectedIndex property on the ribbon to set which tab is the current tab (0 is the first tab, 1 is the second, etc.).

<ribbon:Ribbon SelectedIndex="0" /> 
+13
source share

The only way I 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" ... 
+4
source share

I can’t confirm that this works right now because my preview generally doesn’t work correctly, but it works in general in WPF when trying to hide something only during development.

Include 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 the development time, which eliminates the problem of forgetting to change the selected index to the correct value before creating it.

0
source share

All Articles