There appears to be a bug in the ribbon control setting the RibbonTabItem's visibility using databinding.
If you set the first tab's Visibility to "Collapsed" using databinding, the tab is removed from the ribbon but it's contents are displayed instead of the next tab's contents. This only occurs with databinding. If you set the visibility without databinding, everything works properly. This is only a problem with the first tab. All other tabs work fine.
This also occurs if you set the Visibility to Hidden. The tab is hidden but the tab's contents are displayed.
Here is my xaml:
<Window x:Class="RibbonVisibilityTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igRibbon="http://infragistics.com/Ribbon" Title="MainWindow" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <StackPanel> <igRibbon:XamRibbon> <igRibbon:RibbonTabItem Header="Tab1" Visibility="{Binding TabVisibility}"> <igRibbon:RibbonGroup Caption="Group1"> <igRibbon:ButtonTool Caption="Button1" /> </igRibbon:RibbonGroup> </igRibbon:RibbonTabItem> <igRibbon:RibbonTabItem Header="Tab2"> <igRibbon:RibbonGroup Caption="Group2"> <igRibbon:ButtonTool Caption="Button2" /> </igRibbon:RibbonGroup> </igRibbon:RibbonTabItem> </igRibbon:XamRibbon> </StackPanel></Window>
TabVisibility is a dependency property in the codebehind.
Hello,
Which version of our product you are using? Because I wasn't able to reproduce this issue.
I bind the first tab visibility to my custom object with "System.Windows.Visibility TabVisibility" property and everything works fine.
Regards,
Anastas
I'm using 10.3 with SR 2096.
Here is what I'm seeing. In the first image, Tab1 is collapsed but it's contents are displayed. The second image is when I set it in the xaml. Tab2 is selected automatically and it's contents are displayed. When I databind the Visibility of Tab1, Tab2 isn't selected automatically like it is when I set it in xaml.