Version

ItemBehavior Property

Returns/sets the behavior of GalleryItems when they are clicked.
Syntax
'Declaration
 
Public Property ItemBehavior As GalleryToolItemBehavior
public GalleryToolItemBehavior ItemBehavior {get; set;}
Remarks

If set to 'Button' the GalleryItem is not selected - instead a ItemClicked event is raised. If set to 'StateButton' The GalleryItem is selected and SelectedItem is set to reflect the selection. The ItemSelectedEvent event is raised.

Example
The following example shows how to use the ItemBehavior property to specify the behavior of GalleryItems when they are clicked.

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.ItemBehavior = GalleryToolItemBehavior.StateButton
        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.ItemBehavior = GalleryToolItemBehavior.StateButton;
     	}
    }
}
<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" ItemBehavior="StateButton" ItemActivated="galleryTool_ItemActivated">
            ....
            
</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