Class GalleryGroup
Represents control using for grouping.
Inheritance
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
public class GalleryGroup : HeaderedItemsControl
Remarks
UI framework element based on System.Windows.Controls.HeaderedItemsControl class. Control is used as a host container for items.
Examples
This example shows how to create a GalleryGroup in XAML.
<Window x:Class="Gallery.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="Gallery" Height="300" Width="300">
<StackPanel HorizontalAlignment="Center">
<local:Gallery Name="gallery">
<local:GalleryGroup Name="group">
<local:GalleryItem/>
<local:GalleryItem/>
<local:GalleryItem/>
</local:GalleryGroup>
</local:Gallery>
</StackPanel>
</Window>
This example shows how to create a GalleryGroup in C#.
using System.Windows;
using System.Windows.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
Gallery gallery = new Gallery();
stackPanel.Children.Add( gallery );
GalleryGroup group = new GalleryGroup();
gallery.Items.Add( group );
}
}
}
Constructors
GalleryGroup()
Initializes a new instance of the GalleryGroup class.
Declaration
public GalleryGroup()
Fields
CaptionAlignmentProperty
Identifies CaptionAlignment dependency property.
Declaration
public static readonly DependencyProperty CaptionAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DescriptionAlignmentProperty
Identifies DescriptionAlignment dependency property.
Declaration
public static readonly DependencyProperty DescriptionAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsAlwaysShownCaptionProperty
Identifies the IsAlwaysShownCaption dependency property.
Declaration
public static readonly DependencyProperty IsAlwaysShownCaptionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsDragOverProperty
Identifies IsDragOver dependency property.
Declaration
public static readonly DependencyProperty IsDragOverProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsDragOverPropertyKey
Identifies IsDragOver dependency property key.
Declaration
protected static readonly DependencyPropertyKey IsDragOverPropertyKey
Field Value
Type |
---|
System.Windows.DependencyPropertyKey |
ItemContentTemplateProperty
Identifies ItemContentTemplate dependency property.
Declaration
public static readonly DependencyProperty ItemContentTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ItemContentTemplateSelectorProperty
Identifies ItemContentTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty ItemContentTemplateSelectorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ItemGeneratedEvent
Identifies the ItemGenerated routed_event.
Declaration
public static readonly RoutedEvent ItemGeneratedEvent
Field Value
Type |
---|
System.Windows.RoutedEvent |
SelectedItemsProperty
Identifies SelectedItems dependency property.
Declaration
public static readonly DependencyProperty SelectedItemsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AllowedAnimations
Gets or sets a value that describes allowed animations when group size is changed. This is a dependency property.
Declaration
public AllowedAnimations AllowedAnimations { get; set; }
Property Value
Type | Description |
---|---|
AllowedAnimations | Type: AllowedAnimations Default value is AllowedAnimations.All |
See Also
AllowedItemResizeMode
Gets or sets the value that describes how item size should be changed, when group size is changing. This is dependency property.
Declaration
public AllowedItemResizeModes AllowedItemResizeMode { get; set; }
Property Value
Type | Description |
---|---|
AllowedItemResizeModes | Type: AllowedItemResizeModes Default value is AllowedItemResizeModes.None |
See Also
AllowMultiSelect
Gets or sets a value indicating whether more than one item can be selected in group. This is a dependency property.
Declaration
public bool AllowMultiSelect { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Type: System.Boolean True - more then one item can be selected in group, false - just one item can be selected. |
AllowVaryingItemSize
Gets or sets a value indicating whether [allow varying item size].
Declaration
public bool AllowVaryingItemSize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
CaptionAlignment
Gets or sets the value that represents alignment of caption in gallery item. This is dependency property.
Declaration
public CaptionAlignment CaptionAlignment { get; set; }
Property Value
Type | Description |
---|---|
CaptionAlignment | Type: CaptionAlignment Default value is Top. |
Remarks
Alignment occurs only in Standard mode when IsAlwaysShownCaption is true. It doesn't affect captions in Detailed mode.
See Also
DescriptionAlignment
Gets or sets the value that represents alignment of description in gallery item. This is dependency property.
Declaration
public CaptionAlignment DescriptionAlignment { get; set; }
Property Value
Type | Description |
---|---|
CaptionAlignment | Type: CaptionAlignment Default value is Bottom. |
Remarks
Alignment occurs only in Standard mode when IsAlwaysShownCaption is true. It doesn't affect descriptions in Detailed mode.
See Also
HasFocusIndex
Gets the index of the has focus.
Declaration
public int HasFocusIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the has focus. |
IsAlwaysShownCaption
Gets or sets a value indicating whether the caption and description in gallery item are visible. This is dependency property.
Declaration
public bool IsAlwaysShownCaption { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Type: System.Boolean Default value is false. |
Remarks
When the value is set to false, the caption and the description in gallery item are displayed only in Detailed mode. Otherwise they are always visible.
See Also
IsDragOver
Gets or sets a value indicating whether a group or item is dragging over this. This is dependency property.
Declaration
public bool IsDragOver { get; protected set; }
Property Value
Type |
---|
System.Boolean |
ItemContentTemplate
Gets or sets the value that represents the template of item content data. This is dependency property.
Declaration
public DataTemplate ItemContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | Type: System.Windows.DataTemplate Default value is null. |
ItemContentTemplateSelector
Gets or sets the value that provides a way to choose a System.Windows.DataTemplate based on the data object and the data-bound element.
Declaration
public DataTemplateSelector ItemContentTemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.DataTemplateSelector | Type: System.Windows.Controls.DataTemplateSelector Default value is null. |
See Also
ItemHeight
Gets or sets the value that represents height of items in group. This is dependency property.
Declaration
public double ItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 50. |
ItemMargin
Gets or sets the value that represents margins of items in group. This is dependency properties.
Declaration
public Thickness ItemMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness | Type: System.Windows.Thickness Default value is 0. |
ItemMaxHeight
Gets or sets the maximal value of ItemHeight property. This is dependency property.
Declaration
public double ItemMaxHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 0. |
ItemMaxWidth
Gets or sets the maximal value of ItemWidth property. This is dependency property.
Declaration
public double ItemMaxWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 100. |
ItemMinHeight
Gets or sets the minimal value of ItemHeight property. This is dependency property.
Declaration
public double ItemMinHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 0. |
ItemMinWidth
Gets or sets the minimal value of ItemWidth property. This is dependency property.
Declaration
public double ItemMinWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 0. |
ItemWidth
Gets or sets the value that represents width of items in group. This is dependency property.
Declaration
public double ItemWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 50. |
SelectedItems
Gets or sets the value that is responsible for collecting of selected items. This is dependency property.
Declaration
public ObjectCollection SelectedItems { get; set; }
Property Value
Type | Description |
---|---|
ObjectCollection | Type: ObjectCollection Default value is collection with no items. |
SelectionStartIndex
Gets the value that represents index of the first item in selection.
Declaration
public int SelectionStartIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | Type: System.Int32 Returns -1 if group hasn't selected items, otherwise index of the first item in selection. |
SelectionStartItem
Gets the value that represents start item in selection of items.
Declaration
public object SelectionStartItem { get; }
Property Value
Type | Description |
---|---|
System.Object | Type: System.Object If selection of items exists returns first item, otherwise null. |
SpaceLimitBetweenItems
Gets or sets the value that represents space limit between items in group when AllowedItemResizeMode set to Space value. This is dependency property.
Declaration
public double SpaceLimitBetweenItems { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 0. |
VisualMode
Gets or sets the value that represents visual mode of group. This is dependency property.
Declaration
public GalleryVisualMode VisualMode { get; set; }
Property Value
Type | Description |
---|---|
GalleryVisualMode | Type: GalleryVisualMode Default value is Standard. |
See Also
Methods
ArrangeOverride(Size)
Called to arrange and size the content of a System.Windows.Controls.Control object.
Declaration
protected override Size ArrangeOverride(Size arrangeBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | arrangeBounds | The computed size that is used to arrange the content. |
Returns
Type | Description |
---|---|
System.Windows.Size | The size of the control. |
FireGalleryItemMouseLeftButtonDown(MouseButtonEventArgs, GalleryItem)
Fires GalleryItemMouseLeftButtonDown event.
Declaration
protected virtual void FireGalleryItemMouseLeftButtonDown(MouseButtonEventArgs e, GalleryItem source)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The instance containing the event data. |
GalleryItem | source | Event source. |
GetContainerForItemOverride()
Gets GalleryItem container for non GalleryItem type item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
Type | Description |
---|---|
System.Windows.DependencyObject | New instance of GalleryItem. |
IsItemItsOwnContainerOverride(Object)
Indicates when item type is GalleryItem.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | Given object. |
Returns
Type | Description |
---|---|
System.Boolean | True if item type is GalleryItem, otherwise - false. |
MeasureOverride(Size)
Called to remeasure a control.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | constraint | The maximum size that the method can return. |
Returns
Type | Description |
---|---|
System.Windows.Size | The size of the control, up to the maximum specified by |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCaptionAlignmentChanged(DependencyPropertyChangedEventArgs)
Raises CaptionAlignmentChanged event.
Declaration
protected virtual void OnCaptionAlignmentChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnDescriptionAlignmentChanged(DependencyPropertyChangedEventArgs)
Raises DescriptionAlignmentChanged event.
Declaration
protected virtual void OnDescriptionAlignmentChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnDragEnter(DragEventArgs)
Invoked when System.Windows.DragDrop.DragEnter event is raised.
Declaration
protected override void OnDragEnter(DragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | e | The instance containing the event data. |
OnDragLeave(DragEventArgs)
Invoked when System.Windows.DragDrop.DragLeave event is raised.
Declaration
protected override void OnDragLeave(DragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | e | The instance containing the event data. |
OnDrop(DragEventArgs)
Invoked when Drop event is raised.
Declaration
protected override void OnDrop(DragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DragEventArgs | e | The instance containing the event data. |
OnGalleryItemClick(GalleryItem)
Invoked when item was clicked.
Declaration
protected virtual void OnGalleryItemClick(GalleryItem sender)
Parameters
Type | Name | Description |
---|---|---|
GalleryItem | sender | Instance of GalleryItem item. |
OnGotFocus(RoutedEventArgs)
Invoked when System.Windows.UIElement.GotFocus event is raised.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e | The instance containing the event data. |
OnIsAlwaysShownCaptionChanged(DependencyPropertyChangedEventArgs)
Raises IsAlwaysShownCaptionChanged event.
Declaration
protected virtual void OnIsAlwaysShownCaptionChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnIsDragOverChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IsDragOverChanged event.
Declaration
protected virtual void OnIsDragOverChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the System.Windows.Controls.ItemsControl.Items property changes.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | Information about the change. |
OnKeyDown(KeyEventArgs)
Invoked when System.Windows.UIElement.KeyDown event is raised.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The instance that contains the event data. |
OnLostFocus(RoutedEventArgs)
Invoked when System.Windows.UIElement.LostFocus event is raised.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e | An instance that contains event data. This event data must contains the identifier for the event. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonUp�routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released. |
OnMouseMove(MouseEventArgs)
Invoked when System.Windows.UIElement.MouseMove event is raised.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | An instance that contains event data. |
OnMouseUp(MouseButtonEventArgs)
Invoked when System.Windows.Input.Mouse.MouseUp event is raised.
Declaration
protected override void OnMouseUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The instance that contains the event data. The event data reports that the mouse button was released. |
OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when System.Windows.UIElement.PreviewMouseLeftButtonDown event is raised.
Declaration
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The instance that contains the event data. |
OnQueryContinueDrag(QueryContinueDragEventArgs)
Invoked when QueryContinueDrag event is raised.
Declaration
protected override void OnQueryContinueDrag(QueryContinueDragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.QueryContinueDragEventArgs | e | The instance that contains the event data. |
OnRenderSizeChanged(SizeChangedInfo)
Raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data.
Declaration
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.SizeChangedInfo | sizeInfo | Information about size. |
Events
AllowedItemResizeModeChanged
Event that is raised when AllowedItemResizeMode property is changed.
Declaration
public event PropertyChangedCallback AllowedItemResizeModeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
AllowMultiSelectChanged
Event that is raised when AllowMultiSelect property is changed.
Declaration
public event PropertyChangedCallback AllowMultiSelectChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
AllowVaryingItemSizeChanged
Event that is raised when AllowVaryingItemSize property is changed.
Declaration
public event PropertyChangedCallback AllowVaryingItemSizeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
CaptionAlignmentChanged
Event that is raised when CaptionAlignment property is changed.
Declaration
public event PropertyChangedCallback CaptionAlignmentChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
DescriptionAlignmentChanged
Event that is raised when DescriptionAlignment property is changed.
Declaration
public event PropertyChangedCallback DescriptionAlignmentChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
GalleryItemMouseLeftButtonDown
Event that is raised when item was clicked.
Declaration
public event MouseButtonEventHandler GalleryItemMouseLeftButtonDown
Event Type
Type |
---|
System.Windows.Input.MouseButtonEventHandler |
IsAlwaysShownCaptionChanged
Event that is raised when IsAlwaysShownCaption property is changed.
Declaration
public event PropertyChangedCallback IsAlwaysShownCaptionChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
IsDragOverChanged
Event that is raised when IsDragOver property is changed.
Declaration
public event PropertyChangedCallback IsDragOverChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemContentTemplateChanged
Event that is raised when ItemContentTemplate property is changed.
Declaration
public event PropertyChangedCallback ItemContentTemplateChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemContentTemplateSelectorChanged
Event that is raised when ItemContentTemplateSelector property is changed.
Declaration
public event PropertyChangedCallback ItemContentTemplateSelectorChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemGenerated
Occurs when [item generated].
Declaration
public event RoutedEventHandler ItemGenerated
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
ItemHeightChanged
Event that is raised when ItemHeight property is changed.
Declaration
public event PropertyChangedCallback ItemHeightChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemMarginChanged
Event that is raised when ItemMargin property is changed.
Declaration
public event PropertyChangedCallback ItemMarginChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemMaxHeightChanged
Event that is raised when ItemMaxHeight property is changed.
Declaration
public event PropertyChangedCallback ItemMaxHeightChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemMaxWidthChanged
Event that is raised when ItemMaxWidth property is changed.
Declaration
public event PropertyChangedCallback ItemMaxWidthChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemMinHeightChanged
Event that is raised when ItemMinHeight property is changed.
Declaration
public event PropertyChangedCallback ItemMinHeightChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemMinWidthChanged
Event that is raised when ItemMinWidth property is changed.
Declaration
public event PropertyChangedCallback ItemMinWidthChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ItemWidthChanged
Event that is raised when ItemWidth property is changed.
Declaration
public event PropertyChangedCallback ItemWidthChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
SpaceLimitBetweenItemsChanged
Event that is raised when SpaceLimitBetweenItems property is changed.
Declaration
public event PropertyChangedCallback SpaceLimitBetweenItemsChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
VisualModeChanged
Event that is raised when VisualMode property is changed.
Declaration
public event PropertyChangedCallback VisualModeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |