Double Click on Item in ExplorerControl triggers rename instead of default action (open)

0 Answers 142 Views
FileDialogs
Philipp
Top achievements
Rank 1
Philipp asked on 30 Jun 2021, 11:37 AM

Hello,

when the user double clicks an item in the ExplorerControl a rename is initiated (see attached screenshot). This is usually expected to happen on a slow double click. On a normal double click users expect the file to be opened. The right click context menu also indicates this behavior as the open action is shown bold (and rename is not). So this is a little bit inconsistent and looks like a bug.

For the WinForms Version I found a workaround here: https://www.telerik.com/forums/few-question-on-explorercontrol#5122863

But the WPF Explorer Control is missing a ItemMouseDoubleClick event, so what is the best way to get the expected behavior?

Best regards, Philipp

Martin Ivanov
Telerik team
commented on 02 Jul 2021, 10:09 AM

I've tested this in the latest WPF Demo app, but I wasn't able to reproduce the issue. This said, can you attach a sample project along with a video showing the exact issue?

 

Philipp
Top achievements
Rank 1
commented on 02 Jul 2021, 01:09 PM

The WPF Demo app has excactly the behavior I described (on my computers). Also the attached screenshot is taken from that demo application. If you run the demo application and double click a pdf or jpg file it is opened in your preferred pdf/image viewer?
Martin Ivanov
Telerik team
commented on 07 Jul 2021, 12:01 PM

You are right. Previously I was checking the First Look demo where the file dialog was used. The described behavior is observed in the File Explorer demo. I am afraid that currently this behavior cannot the altered because there is no API that allows access to the rename functionality. However, there is a feature request to introduce this logged in the UI for feedback portal.
Philipp
Top achievements
Rank 1
commented on 29 Dec 2022, 11:09 AM

The feature request is finally completed. But I cannot see any improvement for the described behavior. Could you please check?
Martin Ivanov
Telerik team
commented on 30 Dec 2022, 11:00 AM

Hey Philipp. The feature request was only to introduce a method for customizing or canceling the renaming process. The behavior described in your original post won't change automatically. To get the desired effect, you can use the PreviewMouseDoubleClick and the new Renaming events. For example:

private bool isDoubleClick = false;
private void ExplorerControl_PreviewMouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
	isDoubleClick = true;
}

private void ExplorerControl_Renaming(object sender, Telerik.Windows.Controls.FileDialogs.RenamingEventArgs e)
{
	if (e.FileInfo is FileInfoWrapper && this.isDoubleClick)
	{
		e.Cancel = true;
	}
	isDoubleClick = false;
}

 

Philipp
Top achievements
Rank 1
commented on 30 Dec 2022, 01:31 PM

Hi Martin, thank you very much for your helpful comment. This solves the issue for my use case (with some additional code for handling the double click). 

Additionally I suggest considering to make this default behavior as the ExplorerControl should (in my opinion) behave like the Windows Explorer and to avoid the described inconsistence with the context menu.

Martin Ivanov
Telerik team
commented on 03 Jan 2023, 11:58 AM

Hey Philipp. Appreciating the feedback. Based on it I've logged one more item in the feedback portal that is more specific for this scenario.

No answers yet. Maybe you can help?

Tags
FileDialogs
Asked by
Philipp
Top achievements
Rank 1
Share this question
or