Skip to content

Commit

Permalink
Fix incorrect effect drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Aug 17, 2021
1 parent 4b322eb commit 40f1ea9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/GongSolutions.WPF.DragDrop/DragDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,10 @@ private static void DropTargetOnDragOver(object sender, DragEventArgs e, EventTy
}
else if (DragDropEffectPreview.Effects != dropInfo.Effects || DragDropEffectPreview.EffectText != dropInfo.EffectText || DragDropEffectPreview.DestinationText != dropInfo.DestinationText)
{
DragDropEffectPreview.Effects = dropInfo.Effects;
DragDropEffectPreview.EffectText = dropInfo.EffectText;
DragDropEffectPreview.DestinationText = dropInfo.DestinationText;

var template = GetDragDropEffecTemplate(dragInfo.VisualSource, dropInfo);
if (template is null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/GongSolutions.WPF.DragDrop/DragDropEffectPreview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public DragDropEffectPreview(UIElement rootElement, UIElement previewElement, Po
this.DestinationText = destinationText;
}

public DragDropEffects Effects { get; }
public DragDropEffects Effects { get; set; }

public string EffectText { get; }
public string EffectText { get; set; }

public string DestinationText { get; }
public string DestinationText { get; set; }
}
}

0 comments on commit 40f1ea9

Please sign in to comment.