Displays workbook cell styles as category-grouped previews. Selecting a preview applies its style to the worksheet selection, while the context menu provides style-management actions.
Definition
Namespace:Telerik.WinForms.Controls.Spreadsheet.Controls
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public class SpreadsheetStylesGalleryElement : RadGalleryElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IDropDownMenuOwner, IItemsOwner
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadGalleryElementSpreadsheetStylesGalleryElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the SpreadsheetStylesGalleryElement class.
public SpreadsheetStylesGalleryElement()
Properties
Gets or sets the spreadsheet element whose workbook and active sheet supply the styles and selection state shown in this gallery.
public RadSpreadsheetElement AssociatedSpreadsheetElement { get; set; }
Methods
Adds a category group to the gallery and associates it with the specified cell-style category.
public void AddGroupItem(CellStyleCategory cellStyleCategory, string groupName)
The category represented by the group.
groupNamestringThe displayed group heading.
Creates the gallery's context menu, style-creation tool, and off-screen spreadsheet used to generate style previews.
protected override void CreateChildElements()
Overrides:
Creates the context menu used to manage a style selected in the gallery.
protected virtual RadDropDownMenu CreateDefaultDropDownMenu()
The menu that will contain the style actions.
Creates a menu item for a style action.
protected virtual RadMenuItem CreateMenuItem(string text)
The text displayed by the menu item.
Returns:The created menu item.
Releases the gallery's delayed snapshot-update helper.
protected override void DisposeManagedResources()
Overrides:
Applies a gallery item on left-click or opens its style-management context menu on right-click.
protected virtual void GalleryItem_MouseDown(object sender, MouseEventArgs e)
Adds and wires the Apply, Modify, Duplicate, and Delete actions in the style context menu.
protected virtual void InitializeDropDownMenu()
Creates and measures the off-screen spreadsheet used to render cell-style previews.
protected virtual void InitializeSnapshotSpreadsheet()