Drag handle disapears

9 posts, 0 answers
  1. Bryan
    Bryan avatar
    10 posts
    Member since:
    Sep 2011

    Posted 08 Aug 2012 Link to this post


    Dragging and dropping works great on my development machine, but when I move the application to a client machine and try to drag, the drag object apears briefly then disapears as I move the mouse.  The two machines are running the same operating system.  Is there something Im missing to stop this from happening?  The only difference between machines is on my development one I have the Telerik tools installed and on the client machine I am running the Telerik dlls from a folder.

    thanks for any help,
    Bryan
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 09 Aug 2012 Link to this post

    Hi Bryan,

    Unfortunately this is an issue that we haven't experienced so far. May I ask you to share some more details about your exact implementation of the Drag and Drop scenario? 

    Thank you in advance! 

    Regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Bryan
    Bryan avatar
    10 posts
    Member since:
    Sep 2011

    Posted 09 Aug 2012 Link to this post

    My application is written in WPF and C#.  This application has two windows that I can drag items between.  One window contains a telerik Grid and the other window contains a Canvas.  I am using the RadDragAndDropManager.  I have create a template for the drag object.  On my development machine I have Telerik version 2011.3 installed.  My application works great on my development machine, but when I try to run the application on a client machine where I reference the Telerik dlls in a folder the application behaves strangely.  When I try to drag, my template shows briefly but then disapears and show only a small box.  When this happens I do still have the object I was trying to drag and I can drag between windows, but my template for the drag object does not show.  Any ideas why this is happening?

    Thanks,
    Bryan
  5. Bryan
    Bryan avatar
    10 posts
    Member since:
    Sep 2011

    Posted 09 Aug 2012 Link to this post

    I just figured out that the issue is being caused because of the client machine being on a higher DPI setting than my development machine.  I develop on 96 DPI and the client machine is 125 DPI.  This causes the drag que to disapear on the client machine and not m machine.  Do you have any suggetions for  fixing this?
  6. Nick
    Admin
    Nick avatar
    593 posts

    Posted 09 Aug 2012 Link to this post

    Hi Bryan,

    Could you share some details about the exact implementation of the scenario? 

    Looking forward to your response! 

    All the best,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. Bryan
    Bryan avatar
    10 posts
    Member since:
    Sep 2011

    Posted 09 Aug 2012 Link to this post

    Sure, I'm not exactly sure what details you need, but I have an application that is used to display fields and values. Basically the application is a .net canvas with labels and text boxes.  I have a seperate window that allows the user to drag new fields on the canvas.  Through testing I have discovered that the Telerik drag que disapears on a screen running DPI above 96.  WPF usually takes care of changes in DPI, but the drag que which is a Telerik feature does not seem to handle this.  I believe I can tell the Operating System to not try and adjust my display but I was wondering if Telerik has any ideas or plans to handle changes in DPI like WPF does already.

    Thanks
  8. Nick
    Admin
    Nick avatar
    593 posts

    Posted 10 Aug 2012 Link to this post

    Hello Bryan,

    Can share the Code for the drag initialize handler. Are you setting any dragVisual offset?

    Thank you in advance!

    All the best,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  9. Bryan
    Bryan avatar
    10 posts
    Member since:
    Sep 2011

    Posted 10 Aug 2012 Link to this post

    Here is the code for the DragInfo, I am using the RadDragDropManager.  I have tried going to the DragDropManager, but I cannot find the class that allows me to use DragDropPayloadManager.  I am not setting a DragOffset.

    private void OnGridviewDragInfo(object sender, DragDropEventArgs e)
            {
                RadGridView grid = sender as RadGridView;
                IEnumerable<object> draggedItems = e.Options.Payload as IEnumerable<object>;
     
                if (e.Options.Status == DragStatus.DragInProgress)
                {
                    //Set up drag cue
                    TreeListViewDragCue cue = new TreeListViewDragCue();
                    cue.ItemTemplate = this.Resources["FieldTemplate"] as DataTemplate;
                    cue.ItemsSource = draggedItems;
                    e.Options.DragCue = cue;
                  }
                 else if (e.Options.Status == DragStatus.DragComplete)
                 {
                    //Drag was cancelled
             
                    IList<ParamViewModel> source = grid.ItemsSource as IList<ParamViewModel>;
                    if (draggedItems == null)
                        return;
                    foreach (ParamViewModel draggedItem in draggedItems)
                    {
                        source.Remove(draggedItem);
                        paramGridView.Rebind();
                        //source.Remove(draggedItem);
                    }
     
                   }
            }
  10. Bryan
    Bryan avatar
    10 posts
    Member since:
    Sep 2011

    Posted 14 Aug 2012 Link to this post

    Upgrading to the latest tools has solved my problem.  Thanks for your help.
Back to Top
UI for WPF is Visual Studio 2017 Ready