Class IBlazorDraggingEventArgs
Notifies when the node or connector is dragged.
Inheritance
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class IBlazorDraggingEventArgs : Object
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
<DiagramEvents OnPositionChange = "PositionChanged" ></ DiagramEvents >
</ SfDiagram >
@code
{
public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>();
public void PositionChanged(IBlazorDraggingEventArgs args)
{
args.Cancel = true;
if ((args != null) && (args.State == State.Completed))
{
Console.WriteLine("Dragging");
}
}
protected override void OnInitialized()
{
NodeCollection = new ObservableCollection<DiagramNode>()
{
new DiagramNode(){
Id="node1",
Height = 100,
Width = 100,
OffsetX = 300,
OffsetY = 100
},
};
}
}
Constructors
IBlazorDraggingEventArgs()
Declaration
public IBlazorDraggingEventArgs()
Properties
AllowDrop
Defines the object that can be dropped over another element.
Declaration
public bool AllowDrop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Cancel
Defines if the user can prevent dragging of element over the diagram.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
NewValue
Returns the current node or connector that is being dragged.
Declaration
public DiagramSelectedItems NewValue { get; set; }
Property Value
Type | Description |
---|---|
DiagramSelectedItems | A DiagramSelectedItems object representing the currently dragged node or connector in the diagram. |
OldValue
Returns the previous node or connector that has dragged.
Declaration
public DiagramSelectedItems OldValue { get; set; }
Property Value
Type | Description |
---|---|
DiagramSelectedItems | A DiagramSelectedItems object representing the previously dragged node or connector in the diagram. |
Source
Returns the node or connector that is being dragged.
Declaration
public DiagramSelectedItems Source { get; set; }
Property Value
Type | Description |
---|---|
DiagramSelectedItems | A DiagramSelectedItems object representing the node or connector being dragged in the diagram. |
State
Returns the current action of the dragged element such as starting, dragging, completed.
Declaration
public State State { get; set; }
Property Value
Type | Description |
---|---|
State | A State enum value that represents the current action of the dragged element in the diagram. |
Target
Returns the node or connector that has dragged.
Declaration
public DiagramEventObject Target { get; set; }
Property Value
Type | Description |
---|---|
DiagramEventObject |
TargetPosition
Returns the position of the Target.
Declaration
public PointModel TargetPosition { get; set; }
Property Value
Type | Description |
---|---|
PointModel | A PointModel object representing the position of the target element. |