Back to Devexpress

GalleryItem Class

wpf-devexpress-dot-xpf-dot-bars-46800032.md

latest5.3 KB
Original Source

GalleryItem Class

Represents an item within a gallery.

Namespace : DevExpress.Xpf.Bars

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class GalleryItem :
    FrameworkContentElement,
    ICommandSource
vb
Public Class GalleryItem
    Inherits FrameworkContentElement
    Implements ICommandSource

The following members return GalleryItem objects:

Remarks

A Gallery consists of groups of gallery items. The GalleryItem class represents a gallery item. To access gallery items that belong to a specific gallery group, use the GalleryItemGroup.Items property.

A gallery item is visually represented by an image which is specified by the GalleryItem.Glyph property. The item’s caption and description are specified by the GalleryItem.Caption and GalleryItem.Description properties. To make the item’s caption and description visible, set the Gallery.IsItemCaptionVisible and Gallery.IsItemDescriptionVisible properties to true.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GalleryItem class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-assign-custom-in-place-editors/CS/WpfSpreadsheet_CustomCellEditors/MainWindow.xaml#L522

xml
<dxb:GalleryItemGroup x:Name="grpInsertChartColumn2DCommandGroup" Caption="{Binding ConverterParameter=MenuCmd_InsertChartColumn2DCommandGroup, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" IsCaptionVisible="True">
    <dxb:GalleryItem x:Name="biInsertChartColumnClustered2D" Command="{Binding InsertChartColumnClustered2D, Mode=OneTime, Source={StaticResource commands}}" />
    <dxb:GalleryItem x:Name="biInsertChartColumnStacked2D" Command="{Binding InsertChartColumnStacked2D, Mode=OneTime, Source={StaticResource commands}}" />

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/CS/WpfSpreadsheet_BindToDataSource/MainWindow.xaml#L524

xml
<dxb:GalleryItemGroup x:Name="grpInsertChartColumn2DCommandGroup" Caption="{Binding ConverterParameter=MenuCmd_InsertChartColumn2DCommandGroup, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" IsCaptionVisible="True">
    <dxb:GalleryItem x:Name="biInsertChartColumnClustered2D" Command="{Binding InsertChartColumnClustered2D, Mode=OneTime, Source={StaticResource commands}}" />
    <dxb:GalleryItem x:Name="biInsertChartColumnStacked2D" Command="{Binding InsertChartColumnStacked2D, Mode=OneTime, Source={StaticResource commands}}" />

create-wpf-gallery-control/CS/GalleryControl_Ex/MainWindow.xaml#L29

xml
<dxb:GalleryItemGroup.Items>
    <dxb:GalleryItem Caption="Schedule" Description="Show schedule" Glyph="pack://application:,,,/Images/address-16x16.png"/>
    <dxb:GalleryItem Caption="Roles" Description="Assign roles" Glyph="pack://application:,,,/Images/role-16x16.png"/>

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement GalleryItem

See Also

GalleryItem Members

DevExpress.Xpf.Bars Namespace