Drag and Drop with windows explorer

6 posts, 1 answers
  1. ronald
    ronald avatar
    54 posts
    Member since:
    Jan 2011

    Posted 14 Feb 2011 Link to this post

    Hi,

    I know the windows explorer is not part of the WPF app. However, I need to create a WPF app that can actually drag the file from the windows explorer and drop it to a textbox control. As a result, the full path of the file appears on the textbox control. Does anyone know how to do this? do I need to create a wpf window to make a windows explorer so that I can have a full control over the drag and drop?

    thanks
  2. Answer
    Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 14 Feb 2011 Link to this post

    Hello ronald,

    You can achieve this easily using RaaDragAndDropManager native mode. Please, check the attached sample demonstrating dragging files from Windows Explorer into listbox.

    Let me know if you need any further assistance.

    Kind regards,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. UI for WPF is Visual Studio 2017 Ready
  4. ronald
    ronald avatar
    54 posts
    Member since:
    Jan 2011

    Posted 14 Feb 2011 Link to this post

    perfect.. just one more thing.. How can i do the animation while draging the file from the windows explorer?
  5. ronald
    ronald avatar
    54 posts
    Member since:
    Jan 2011

    Posted 14 Feb 2011 Link to this post

    sorry.. i tried the same thing for textbox but it does not allow to drop the file. What am I doing wrong?

    <TextBox Grid.Row="1"
              telerik:RadDragAndDropManager.AllowDrop="True"
              telerik:RadDragAndDropManager.DropQuery="OnDropQuery"
              telerik:RadDragAndDropManager.DropInfo="OnDropInfo" Margin="55,0,227,0">
     
            </TextBox>
  6. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 15 Feb 2011 Link to this post

    Hi ronald,

    We have investigated the issue you are getting and the problem with the textbox originates in the fact that textboxes can accept only text data and rejects other types. This is build in functionality and has known workaround. I have modified the sample application demonstrating how to enable dropping files into textbox.

    Best wishes,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  7. ronald
    ronald avatar
    54 posts
    Member since:
    Jan 2011

    Posted 15 Feb 2011 Link to this post

    mate.. thanks for the udpated project.. would be nice if it had an animation while draging the file. would guide me through? thanks
Back to Top
UI for WPF is Visual Studio 2017 Ready