I have a `RadPanelBar` bound to an `ItemsSource`. I have it set to `SelectionMode` single. And my view-model ensures that there is always a a selected item.
But how do I force the Panel Bar to make the selected item always be expanded. I do not want to allow the user to be allowed to ever collapse it. Is it a property I can set in the ItemContainerStyle? Something else?
At one point I tried binding the RadPanelBarItem.IsExpanded property to its `IsSelected` property. But that didn't work.
But how do I force the Panel Bar to make the selected item always be expanded. I do not want to allow the user to be allowed to ever collapse it. Is it a property I can set in the ItemContainerStyle? Something else?
At one point I tried binding the RadPanelBarItem.IsExpanded property to its `IsSelected` property. But that didn't work.
<tk:RadPanelBar x:Name="PanelBar" BorderThickness="0"
Padding="0 3 0 0"
tk:AnimationManager.IsAnimationEnabled="True"
SelectedItem="{Binding CurrentAnalysisCategory, Mode=TwoWay}"
ItemsSource="{Binding AnalysisCategories}"
VerticalContentAlignment="Stretch"
VerticalAlignment="Stretch">
<tk:RadPanelBar.Resources>
<DataTemplate DataType="{x:Type avm:RoutinesVm}">
<views:RoutinesPanel />
</DataTemplate>
<DataTemplate DataType="{x:Type avm:MeasurementsVm}">
<views:MeasurementsPanel/>
</DataTemplate>
<DataTemplate x:Key="ViewTemplate">
<ContentPresenter Content="{Binding}" />
</DataTemplate>
</tk:RadPanelBar.Resources>
<tk:RadPanelBar.ItemTemplate>
<HierarchicalDataTemplate
ItemsSource="{Binding Data}"
ItemTemplate="{StaticResource ViewTemplate}">
<TextBlock Text="{Binding Name}" HorizontalAlignment="Center" VerticalAlignment="Center" />
</HierarchicalDataTemplate>
</tk:RadPanelBar.ItemTemplate>
<tk:RadPanelBar.ItemContainerStyle>
<Style TargetType="{x:Type tk:RadPanelBarItem}">
<Setter Property="Padding" Value="3"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MaxHeight" Value="{Binding ElementName='Root', Path=MaxItemHeight}"/>
<Setter Property="MaxWidth" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type views:ScanImagePanel}}, Path=ActualWidth}"/>
<Setter Property="tk:AnimationManager.AnimationSelector" Value="{StaticResource FastAnimator}"/>
</Style>
</tk:RadPanelBar.ItemContainerStyle>
</tk:RadPanelBar>