Version

PreferredDropDownColumns Property

Returns/sets the preferred number of columns that should be displayed in the gallery dropdown.
Syntax
'Declaration
 
Public Property PreferredDropDownColumns As Integer
public int PreferredDropDownColumns {get; set;}
Remarks

The value specified for PreferredDropDownColumns is used when a gallery preview is not being displayed (as determined by the setting of MenuTool.ShouldDisplayGalleryPreview property on the MenuTool containing the GalleryTool) and therefore the the width of gallery dropdown is not being constrained.

Example
The following example shows how to use the GalleryTool properties to specify how the gallery's drop down looks like

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


Namespace MyNamespace
    Public Partial Class MyWindow
        Inherits XamRibbonWindow
        Public Sub New()
            InitializeComponent()
        End Sub
       
        Private Sub SetupGalleryTool()
           galleryTool.MaxDropDownColumns = 7
           galleryTool.MaxPreviewColumns = 7
           galleryTool.MinDropDownColumns = 3
           galleryTool.MinPreviewColumns = 3
           galleryTool.PreferredDropDownColumns = 5
        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 SetupGalleryTool()
        {
            galleryTool.MaxDropDownColumns = 7;
            galleryTool.MaxPreviewColumns = 7;
            galleryTool.MinDropDownColumns = 3;
            galleryTool.MinPreviewColumns = 3;
            galleryTool.PreferredDropDownColumns = 5;
        }
    }
}
<igRibbon:XamRibbonWindow x:Class="MyWindow"
    
xmlns:igRibbon="http://infragistics.com/Ribbon">

    ....

    
<igRibbon:RibbonGroup Id="groupId" Caption="GroupName">
        
<igRibbon:MenuTool ShouldDisplayGalleryPreview="True" Caption="GalleryToolMenu">
            
<igRibbon:GalleryTool Name="galleryTool"
                
MaxDropDownColumns = "7";
                MaxPreviewColumns =
 "7";
                MinDropDownColumns = "3";

                
MinPreviewColumns = "3";
                PreferredDropDownColumns =
 "5";>
            
</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