バージョン

HasCaption プロパティ (GalleryTool)

ゼロより長いキャプションがツールにある場合、True を返します。そうでない場合は False を返します。(読み取り専用)
シンタックス
'宣言
 
Public ReadOnly Property HasCaption As Boolean
public bool HasCaption {get;}
使用例
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()
            ' Has caption
            If galleryTool.HasCaption Then
                    ' do something if gallery has caption
            Else
                    ' do something else
            End If
        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()
        {
            // Has caption
            if (galleryTool.HasCaption)
            {
                // do something if gallery has caption
            }
            else
            {
                // do something else
            }
	}
    }
}
<igRibbon:XamRibbonWindow x:Class="SnippetApp.Window1"
    
xmlns:igRibbon="http://infragistics.com/Ribbon">

        
<igRibbon:RibbonWindowContentHost.Resources>
            
            
<Style x:Key="galleryStyle" TargetType="{x:Type igRibbon:GalleryTool}">
                
<Style.Triggers>
                    
<Trigger Property="HasCaption" Value="True">
                        
<Setter Property="RenderTransform">
                            
<Setter.Value>
                                
<RotateTransform Angle="10"/>
                            
</Setter.Value>
                        
</Setter>
                    
</Trigger>
        
</Style.Triggers>
        
</Style>
        
<igRibbon:RibbonWindowContentHost.Resources>

    ....

    
<igRibbon:GalleryTool Name="galleryTool" Style="{StaticResource galleryStyle}"/>

    ....

</igRibbon:XamRibbonWindow>
参照