我试图做一个附加行为来重新排序行bby做 Drag & Drop
我发现了一些解决方案(在Stackoverflow上和通过谷歌搜索)并使用它们我试图做出行为......我从Hordcodenet网站上拿了例子(我现在没有链接)
public static class DragDropRowBehavior
{
    private static DataGrid dataGrid;
    private static Popup popup;
    private static bool enable;
    private static object draggedItem;
    public static object DraggedItem
    {
        get { return DragDropRowBehavior.draggedItem; }
        set { DragDropRowBehavior.draggedItem = value; }
    }
    public static Popup GetPopupControl(DependencyObject obj)
    {
        return (Popup)obj.GetValue(PopupControlProperty);
    }
    public static void SetPopupControl(DependencyObject obj, Popup value)
    {
        obj.SetValue(PopupControlProperty, value);
    }
    // Using a DependencyProperty as the backing store for PopupControl.  This enables animation, styling, binding, etc... …