![Avatar](https://secure.gravatar.com/avatar/ec3523eea7025c0a204931fc85ea8bf1.jpg?s=64&d=identicon&r=g)
The behavior of the ribbon when we use the Visibility property instead of the IsActive property is very confusing. Please refer to the attached image.
![](https://oomqsg.sn2.livefilestore.com/y1pTNcdDmwlgCeMJF291jMDWL7-AhhTBQjehAOcAKtAUJf8WV8T6kLWiM-VGSdB5_nhV5wzkRp6u_THG7ZCxpAnPEsT3FCwHx_y/%2815%29.png?psid=1)
The XAML for the above window is as follows.
<ribbon:RibbonWindow x:Class="ContextualTabsGroupIssues.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
Title="MainWindow"
Width="525"
Height="350">
<ribbon:Ribbon>
<ribbon:Ribbon.Tabs>
<ribbon:Tab Label="Item 1" />
<ribbon:Tab Label="Item 2" />
<ribbon:Tab Label="Item 3" />
</ribbon:Ribbon.Tabs>
<ribbon:Ribbon.ContextualTabGroups>
<ribbon:ContextualTabGroup Visibility="Visible" Label="ContextItems">
<ribbon:Tab Label="Item 1" />
<ribbon:Tab Label="Item 2" />
</ribbon:ContextualTabGroup>
</ribbon:Ribbon.ContextualTabGroups>
</ribbon:Ribbon>
</ribbon:RibbonWindow>
Unfortunately, since setting Visibility directly doesn't crash the app, but insteads degrades quite ungracefully, it is very difficult to debug this issue. We spent a lot of time with debugging why the ribbon was displaying this way.
While I can appreciate that there maybe technical limitations to using Visibility directly, I think it is poor form to not guard against it with at least some kind of exception, and instead to fail without any obvious recourse.
[Modified 12 years ago]