Unplanned
Last Updated: 31 Mar 2020 09:54 by ADMIN
Olivier
Created on: 24 Mar 2020 11:08
Category: NavigationView
Type: Feature Request
1
NavigationView: Allow to deselect current item by clicking again on it

Hello,

Currently when we start the application, no item is selected. Once we select one it appears as selected and we show a related pane. This is the nominal behavior of the component.

But we want to deselect it when we are clicking again on it (like in Visual Studio Code). So ideally we want a NavigationItemBehavior property with a value "Normal" and a value "Toggle".

 

Regards,

1 comment
ADMIN
Martin Ivanov
Posted on: 31 Mar 2020 09:54

Hi Olivier,

Thank you for the idea. It sounds reasonable, so we've approved this. Also, we've changed the title a bit in order to meet the naming convention in the portal.  

Currently, you can achieve your requirement by using the ItemClick event of RadNavigationView. 

private void RadNavigationView_ItemClick(object sender, RoutedEventArgs e)
{
	var item = (RadNavigationViewItem)e.OriginalSource;
	if (item.IsSelected)
	{
		Dispatcher.BeginInvoke(new Action(() =>
		{
			item.IsSelected = false;
		}));
	}
}

Regards,
Martin Ivanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.