public void SetPayload(IDnDContainer <TItem> parent, int indexInParent, IDnDElement <TItem> wrappingElement)
 {
     Payload = new DnDPayload <TItem>()
     {
         Parent          = parent,
         IndexInParent   = indexInParent,
         WrappingElement = wrappingElement
     };
     NotifyStateChanged();
 }
 public void SetTarget(IDnDContainer <TItem> parent, int indexInParent, IDnDElement <TItem> wrappingElement, bool isDropFirst = true)
 {
     Target = new DnDPayload <TItem>()
     {
         Parent          = parent,
         IndexInParent   = indexInParent,
         WrappingElement = wrappingElement,
         GroupAsFirst    = isDropFirst
     };
     NotifyStateChanged();
 }
        public void ShowNewItem(IDnDContainer <TItem> parent, int indexInParent, IDnDElement <TItem> wrappingElement)
        {
            NewItemPayload = new DnDPayload <TItem>()
            {
                Parent          = parent,
                IndexInParent   = indexInParent,
                WrappingElement = wrappingElement
            };

            // TODO: Need to figure out how to add a new item when we are not supplying a parent
            var parentObj = parent is null || parent == BaseContainer ? default : parent.Parent.Children[parent.IndexInParent];

                            NewItem = BaseContainer.NewItemMethod is { } ? BaseContainer.NewItemMethod.Invoke(parentObj) : default;
 public void ShowNewItem(IDnDContainer <TItem> parent, TItem item, IDnDElement <TItem> wrappingElement)
 {
     ShowNewItem(parent, parent?.Children?.IndexOf(item) ?? -1, wrappingElement);
 }
 public void SetTarget(IDnDContainer <TItem> parent, TItem item, IDnDElement <TItem> wrappingElement, bool isDropFirst = true)
 {
     SetTarget(parent, parent?.Children?.IndexOf(item) ?? -1, wrappingElement, isDropFirst);
 }
 public void SetPayload(IDnDContainer <TItem> parent, TItem item, IDnDElement <TItem> wrappingElement)
 {
     SetPayload(parent, parent?.Children?.IndexOf(item) ?? -1, wrappingElement);
 }