The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
i want to customize drag-drop node while making change to wpf TreeviewToDiagram example. i v changed arg.Source properties, especially the width and the height, but the dropped node kept being of 10.
private void OnDragEnter(object obj)
{
var args = obj as ItemDropEventArgs;
// args.Source have the data which is dragged for drop.
if (args.Source is DataObject)
{
object dataObject = (args.Source as DataObject).GetData(typeof(DragObject<TreeViewItem>));
TreeViewItem treeViewItem = (dataObject as DragObject<TreeViewItem>).Source;
//Convert the unknown treeviewitem to diagram known object(NodeViewModel).
KRKarkuvel Rajan Shanmugavel Syncfusion Team April 15, 2021 12:33 PM UTC
Hi James,
Requirement: Need to customize the Drag and Drop node from TreeView
From the provided code we suspect that you have written a common style for Node and mention height in that. So only you couldn’t able to customize the dropped node. Please remove the common style for Node. We have prepared a simple sample for your requirement. Please find the sample link below.
KRKarkuvel Rajan Shanmugavel Syncfusion Team April 19, 2021 06:25 AM UTC
Hi James,
Most welcome. Please let us know if you need any further assistance.
Regards,
Karkuvel Rajan S
JAjamesMay 1, 2021 03:27 AM UTC
hello, when I dragged a node from treeview to diagram and overlapped the node to a existing node in the diagram, I want the node to show indicator style but failed.
KRKarkuvel Rajan Shanmugavel Syncfusion Team May 3, 2021 10:17 AM UTC
Hi James,
Requirement: Need to highlight the dropped node when new node is comes over it.
In SfDiagram , we have the support for Nodedropindicatorstyle after drop the node in the diagram. But your requirement needs indicator while dragging node over the diagram from SfTreeView before dropping. So we have used the DragOver, DragLeave and ItemDrop events to achieve your requirement. In the sample we have used DragOver event to find the TargetNode and remove the highlight for the TargetNode in DragLeave and ItemDrop events. Please find the sample below.