This is a migrated thread and some comments may be shown as answers.

ExplorerControl - ContextMenus and File Selection

2 Answers 36 Views
FileDialogs
This is a migrated thread and some comments may be shown as answers.
Sandra
Top achievements
Rank 1
Sandra asked on 10 Apr 2019, 10:36 AM

Hello,

 

I just added an "ExplorerControl" to my view and realized that the ContextMenu-Placement seems to be wrong.

The ContextMenu of for example MainPane does not appear at mouse point or in MainPane area. (See attached image)

 

Furthermore I want to select one file by code (to have one file selected as an initial state) and found no way to do that.

 

Have you any suggestions for me? 

 

Best Regards 

Sandra

2 Answers, 1 is accepted

Sort by
0
Sandra
Top achievements
Rank 1
answered on 11 Apr 2019, 05:14 AM

I think my "ContectMenu-Placement" issue has something to do with display settings on windows.

Normally I use my laptop with a docking station and external screens. Yesterday I used only my laptop and its screen. Than this Placement issue appears.

So actually I think this is a Windows problem and has nothing to do with the telerik ExplorerControl. Sorry for that. :)

 

So I have only my second question left here (Setting SelectedFileName initially).

 

Best Regards

Sandra

0
Accepted
Petar Mladenov
Telerik team
answered on 11 Apr 2019, 11:24 AM
Hi Sandra,

Currently the ExplorerControl's SelectedFileName has public setter but private setter. This is mainly to mimic the behavior of Windows MS Dialogs. Just like Dialogs have InitialDirectory on start and Filename on dialog close, the ExplorerControl has CurrentDirectoryPath (allowing initial folder set in XAML / code) and SelectedFilename provided runtime, when user selected file / folder (depending on IsFolderBrowser = false / true). Currently if you need to achieve this behavior you can try subscribing for Loaded event of the explorer control, then get the ListBox or GridView which is loaded in main pane and set IsSelected to true on the ListBoxItem / GridViewRow that you need to select.

Regards,
Petar Mladenov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
FileDialogs
Asked by
Sandra
Top achievements
Rank 1
Answers by
Sandra
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or