ExplorerControl - ContextMenus and File Selection

3 posts, 1 answers
  1. Sandra
    Sandra avatar
    2 posts
    Member since:
    Aug 2014

    Posted 10 Apr Link to this post

    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. Sandra
    Sandra avatar
    2 posts
    Member since:
    Aug 2014

    Posted 11 Apr in reply to Sandra Link to this post

    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

  3. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    3083 posts

    Posted 11 Apr Link to this post

    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.
Back to Top