Completed
Last Updated: 12 Jan 2021 14:16 by ADMIN
Release R1 2021
Martin Ivanov
Created on: 01 Jan 2021 12:23
Category: NavigationView
Type: Bug Report
0
NavigationView: Invisible navigation view item when it has sub items and one of them is selected, in Office2013 theme
If you collapse a RadNavigationViewItem with sub items where one of them is selected, the foreground of the parent item becomes white and it looks invisible on the default white background.

This reproduces in the Office2013 theme.

To work this around, extract the ControlTemplate of RadNavigationViewItem and change the Foreground values in the following trigger from MainBrush to AccentBrush or another brush of your choice.
<MultiDataTrigger>
	<MultiDataTrigger.Conditions>
		<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsExpanded}" Value="False"/>
		<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=HasSelectedSubItem}" Value="True"/>
	</MultiDataTrigger.Conditions>
	<Setter TargetName="IconContent" Property="TextElement.Foreground" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}"/>
	<Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}"/>
	<Setter TargetName="ExpandedIcon" Property="TextElement.Foreground" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}"/>
	<Setter TargetName="CollapsedIcon" Property="TextElement.Foreground" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}"/>
	<Setter Property="BorderBrush" Value="{StaticResource NavigationView_NavItemBorderBrush_Selected}"/>
	<Setter TargetName="SelectedVisual" Property="helpers:ThemeHelper.CheckedBrush" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}"/>
	<Setter TargetName="SelectedVisual" Property="Opacity" Value="1"/>
</MultiDataTrigger>
0 comments