Unlike other WinForms controls, our GalleryControl has a fixed scrollbar width. If the default scrollbar width is not acceptable due to the application design, it is possible to create a custom GalleryControl component and change the default scrollbar size by overriding the CalcControlBounds method in the GalleryControlGalleryViewInfo class. This method should return a rectangle that will be used as scroll bar bounds.
using DevExpress.XtraBars.Ribbon.Gallery;
using DevExpress.XtraBars.Ribbon.ViewInfo;
namespace DxSample.Gallery {
public class CustomGallery :GalleryControlGallery {
public CustomGallery() : base() { }
public CustomGallery(CustomGalleryControl galleryControl) : base(galleryControl) { }
protected override BaseGalleryViewInfo CreateViewInfo() {
return new CustomGalleryViewInfo(this);
}
}
}
Facebook
Twitter
Google+