Hallo,
i'm searching for a way to rearrange the order of GalleryItems inside one stand allone GalleryControl by Drag and Drop.
Perhaps with a Exampel.
Thanks
Erik
GalleryControl arrange GalleryItems by Drag and Drop
Answers
Hi Uwe,
This can be done only via the GalleryControl's descendant. I have attached a sample project illustrating how this task can be accomplished.
Thanks,
Ted
You're welcome, Uwe. Please do not hesitate to contact us if you find an issue in our product or run into a problem when using it. We will be happy to assist you.
Thanks,
Ted
Hi, I have implemented this one but when I`m adding MyGalleryControl to a Form and edit some properties in MyGalleryControl.Gallery the designer makes a new MyGalleryControlGallery and on startup it fails (Object reference not set to an instance of an object.)
If I change AllowHoverImages on my custom gallery the designer referers directly to a MyGalleryControlGallery. This one failes on startup with an Object reference not set to an instance of an object.
C#//
// myGalleryControlGallery1
//
this.myGalleryControlGallery1.AllowHoverImages = true;
But If I`m using the GalleryControl it referers to the gallery controls gallery like this.
C#//
// galleryControlGallery1
//
this.galleryControl1.Gallery.AllowHoverImages = true;
This works, but not my custom implementation.
I have implemented it as the sample provided.
Hi Ronny,
To avoid this shortcoming, I suggest you apply the DesignerSerializationVisibility attribute to the Gallery property in your descendant:
C#[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public new MyGalleryControlGallery Gallery {
get { return (MyGalleryControlGallery)base.Gallery; }
}
Visual Basic<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public Shadows ReadOnly Property Gallery() As MyGalleryControlGallery
Get
Return CType(MyBase.Gallery, MyGalleryControlGallery)
End Get
End Property
Feel free to contact us if you need further assistance.