Why 'NGalleryItem' is not a control??


https://www.nevron.com/Forum/Topic9558.aspx
Print Topic | Close Window

By Jiyong Yang - 5 Years Ago
i'm trying to use 'Nevron.UI.WinForm.Controls.NGalleryPanel', using 'NGalleryItem'.
Now i want to implement 'drag and drop' in NGalleryPanel.
'''code'''
private void Form1_DragDrop(object sender, DragEventArgs e)
   {
    NGalleryItem data = (NGalleryItem)e.Data.GetData(typeof(NGalleryItem));
    NGalleryPanel galleryPanel = (NGalleryPanel)sender;

    Point p = galleryPanel.PointToClient(new Point(e.X, e.Y));
    var item = galleryPanel.GetChildAtPoint(p);
    int index = galleryPanel.Controls.GetChildIndex(item, false);
    galleryPanel.Controls.SetChildIndex(data, index);
    galleryPanel.Invalidate();
   }

galleryPanel.Controls.SetChildIndex(data, index);
this cause error because "NGalleryItem" is not a control..

How can i implement drag and drop in NGalleryPanel??