Click or drag to resize

ViewManagerOnViewDragDrop Event

View DragDrop Event

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public event ViewDragDropEventHandler OnViewDragDrop

Value

Type: ViewDragDropEventHandler
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    // Event 선언
    vizcore3d.View.OnViewDragDrop += View_OnViewDragDrop;
}

private void View_OnViewDragDrop(object sender, Event.EventManager.ViewDragDropEventArgs e)
{
    int x = e.X;
    int y = e.Y;

    // 해당 위치 개체 조회
    int index = vizcore3d.View.HitTest(x, y);
    if(index != -1)
    {
        VIZCore3D.NET.Data.Node node = vizcore3d.Object3D.FromIndex(index);
    }

    // 해당 위치 선택상자(SelectionBox) 조회
    int id = vizcore3d.SelectionBox.HitTest(x, y);
    if(id != -1)
    {
        VIZCore3D.NET.Data.SelectionBox box = vizcore3d.SelectionBox.GetItem(id);
    }

    // Drag Item
    if(e.DragItem != null)
    {
        // Example : ListViewItem lvi = (ListViewItem)e.DragItem;
    }
}
See Also