mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-15 05:36:35 +08:00
23 lines
607 B
C#
23 lines
607 B
C#
using System;
|
|
using System.Windows;
|
|
using GongSolutions.Wpf.DragDrop;
|
|
|
|
namespace Showcase.WPF.DragDrop.Models
|
|
{
|
|
public class NestedDropHandler : IDropTarget
|
|
{
|
|
public void DragOver(IDropInfo dropInfo)
|
|
{
|
|
if (dropInfo.TargetItem?.ToString().StartsWith("Root", StringComparison.OrdinalIgnoreCase) == true)
|
|
{
|
|
dropInfo.Effects = DragDropEffects.Move;
|
|
dropInfo.DropTargetAdorner = DropTargetAdorners.Highlight;
|
|
}
|
|
}
|
|
|
|
public void Drop(IDropInfo dropInfo)
|
|
{
|
|
// nothing
|
|
}
|
|
}
|
|
} |