Version

ItemSettings Property (GalleryTool)

Returns/sets the settings that will be used as the default for all GalleryItems. These settings can be overridden at lower levels.
Syntax
'Declaration
 
Public Property ItemSettings As GalleryItemSettings
public GalleryItemSettings ItemSettings {get; set;}
Remarks

The various property values in the GalleryItemSettings specified at the GalleryTool level (via the ItemSettings property) serve as the ultimate defaults for all GalleryItems. These values can be overridden at two lower levels:

Example
The following example shows how to use the ItemSettings property to specify the settings that will be used as the default for all GalleryItems in each GalleryItemGroup.

Imports System
Imports System.Windows
Imports Infragistics.Windows.Ribbon


Namespace MyNamespace
    Partial Public Class MyWindow
        Inherits XamRibbonWindow
        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub SetGalleryItemSetting()
            Dim setting As New GalleryItemSettings()
            setting.TextDisplayMode = GalleryItemTextDisplayMode.Always
            galleryTool.ItemSettings = setting
        End Sub
    End Class
End Namespace
using System;
using System.Windows;
using Infragistics.Windows.Ribbon;


namespace MyNamespace
{
    public partial class MyWindow : XamRibbonWindow
    {
        public MyWindow()
        {
            InitializeComponent();
        }

        private void SetGalleryItemSetting()
        {
            GalleryItemSettings setting = new GalleryItemSettings();
            setting.TextDisplayMode = GalleryItemTextDisplayMode.Always;
            galleryTool.ItemSettings = setting;
        }
    }
}
<igRibbon:XamRibbonWindow x:Class="SnippetApp.Window1"
    
xmlns:igRibbon="http://infragistics.com/Ribbon">

          ....

    
<igRibbon:RibbonGroup Id="GroupId" Caption="Ribbon group">
        
<igRibbon:MenuTool ShouldDisplayGalleryPreview="True" Caption="GalleryToolMenu">
            
<igRibbon:GalleryTool Name="galleryTool" >
                
<igRibbon:GalleryTool.ItemSettings>
                        
<igRibbon:GalleryItemSettings TextDisplayMode="Always" TextPlacement="AboveImage" 
                                                      
HorizontalTextAlignment="Center" VerticalTextAlignment="Top"
                                                      
SelectionDisplayMode="HighlightEntireItem"/>
                
</igRibbon:GalleryTool.ItemSettings>
                        
                
<igRibbon:GalleryTool.Items> 
                    
<igRibbon:GalleryItem Key="Item1" Text="Item1" Image="\Images\ig_office_icon_16.png"/>
                    
<igRibbon:GalleryItem Key="Item2" Text="Item2" Image="\Images\ig_office_icon_16.png"/>
                    
<igRibbon:GalleryItem Key="Item3" Text="Item3" Image="\Images\ig_office_icon_16.png"/>
                    
<igRibbon:GalleryItem Key="Item4" Text="Item4" Image="\Images\ig_office_icon_16.png"/>
                    
<igRibbon:GalleryItem Key="Item5" Text="Item5" Image="\Images\ig_office_icon_16.png" ColumnSpan="3"/>
                    
<igRibbon:GalleryItem Key="Item6" Text="Item6" Image="\Images\ig_office_icon_16.png"/>
                    
<igRibbon:GalleryItem Key="Item7" Text="Item7" Image="\Images\ig_office_icon_16.png" Tag="myTag"/>
                    
<igRibbon:GalleryItem Key="Item8" Text="Item8" Image="\Images\ig_office_icon_16.png"/>
                    
<igRibbon:GalleryItem Key="Item9" Text="Item9" Image="\Images\ig_office_icon_16.png" IsSelected="True"/>
                    
<igRibbon:GalleryItem Key="Item10" Text="Item10" Image="\Images\ig_office_icon_16.png"/>                                                                               
                    
<igRibbon:GalleryItem Key="Item11" Text="Item11" Image="\Images\ig_office_icon_16.png"/>
                
</igRibbon:GalleryTool.Items>
            
</igRibbon:GalleryTool>
        
</igRibbon:MenuTool>
     
</igRibbon:RibbonGroup>

    ....

</igRibbon:XamRibbonWindow>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also