Version

SizingMode Property (GalleryTool)

Returns an enumeration that indicates the current size of the tool. (read only)
Syntax
'Declaration
 
Public ReadOnly Property SizingMode As RibbonToolSizingMode
public RibbonToolSizingMode SizingMode {get;}
Remarks

Possible sizes include: ImageOnly, ImageAndTextNormal, ImageAndTextLarge.

Example
The following example shows how to use the SizingMode property to determinate current size of the gallery tool.

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 CheckGalleryTool()
            ' Sizing mode
            Dim mode As RibbonToolSizingMode = galleryTool.SizingMode
            Select Case mode
                Case RibbonToolSizingMode.ImageAndTextLarge
                    'do something
                    Exit Select
                Case RibbonToolSizingMode.ImageAndTextNormal
                    'do something
                    Exit Select
                Case RibbonToolSizingMode.ImageOnly
                    'do someting
                    Exit Select
            End Select
        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 CheckGalleryTool()
        {
            // Sizing mode
            RibbonToolSizingMode mode = galleryTool.SizingMode;
            switch (mode)
            {
                case RibbonToolSizingMode.ImageAndTextLarge:
                    //do something
                    break;
                case RibbonToolSizingMode.ImageAndTextNormal:
                    //do something
                    break;
                case RibbonToolSizingMode.ImageOnly:
                    //do someting
                    break;
            }
	     }
    }
}
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