Ticket Q306870
Visible to All Users

GalleryControl arrange GalleryItems by Drag and Drop

created 14 years ago

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

Answers

created 14 years ago

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

    Show previous comments (1)
    DevExpress Support Team 14 years ago

      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.

        DevExpress Support Team 11 years ago

          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.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.