RibbonGallery

Represents a Gallery control in the SharePoint Server Ribbon.

Ribbon Gallery Control

Inheritance Hierarchy


Assembly: QASPRibbon.dll
Namespace: QASPRibbon.Controls

Properties

Property Type Description
Id String A string that identifies the flyout anchor, such as "RibbonControl". (Inherited from RibbonElement)
Title String A string value representing the flyout anchor's label. (Inherited from RibbonElement)
Visible Boolean A value that indicates whether a flyout anchor control is rendered on the ribbon. (Inherited from RibbonVisualControl)
Enabled Boolean A value that indicates whether a flyout anchor control is enabled. (Inherited from RibbonVisualControl)
ToolTip RibbonToolTip The tooltip of the flyout anchor. (Inherited from RibbonVisualControl)
ElementDimensions RibbonGalleryElementSize An enumeration value that specifies the dimensions of rectangular child elements
Width Int32 The width of gallery in elements. Total width in pixels equals Width times child button' width.
Controls IEnumerable<RibbonGalleryButton> Buttons used in the gallery.

Constructors

public RibbonGallery()

public RibbonGallery(string id)

public RibbonGallery(string id, string title)

Example

The following example defines a gallery with two child buttons:
// Initialization a new gallery
var gallery = new RibbonGallery("GalleryId", "GalleryTitle");
// Setting dimension of child buttons
gallery.ElementDimensions = RibbonGalleryElementSize.Size128by128;
// Setting width. Total width in pixels'll be 256px (256*5)
gallery.Width = 2;

// First button
var galleryButton1 = new RibbonGalleryButton("Button1", "First Button");
galleryButton1.ImageUrl = "/UrlToImage";

// Second one
var galleryButton2 = new RibbonGalleryButton("Button2", "Second Button");
galleryButton2.ImageUrl = "/UrlToImage";

// Adding buttons to the gallery
gallery.Controls = new RibbonControl[]
    {
        galleryButton1,
        galleryButton2
    };

Last edited Aug 23, 2013 at 7:16 AM by VitalyZhukov, version 4

Comments

No comments yet.