バージョン

ToolTip プロパティ (SummaryDefinition)

ToolTip はマウスが関連付けられた集計結果上にホバーされた時に表示するツールチップを指定します。
シンタックス
'宣言
 
Public Property ToolTip As Object
public object ToolTip {get; set;}
解説

ToolTip はマウスが関連付けられた集計結果上にホバーされた時に表示するツールチップを指定します。このプロパティの値として文字列値を指定できることに注意してください。

使用例
Imports Infragistics.Windows
Imports Infragistics.Windows.Editors
Imports Infragistics.Windows.DataPresenter

    Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        ' Set the data source.
        _dp.DataSource = _dataSource

        Dim summaryDef1 As SummaryDefinition = _dp.FieldLayouts(0).SummaryDefinitions.Add( _
            "PriceAverage", SummaryCalculator.Average, "Price")

        ' All summary results associated with this summary definition will use this
        ' tool-tip.
        summaryDef1.ToolTip = "Price Average"

        ' Add a second summary that gets used in dp_SummaryResultChanged below.
        Dim summaryDef2 As SummaryDefinition = _dp.FieldLayouts(0).SummaryDefinitions.Add( _
            "PriceTotal", SummaryCalculator.Sum, "Price")
    End Sub

    ' If the tool-tip needs to be based on the summary result value, you can 
    ' set the ToolTip on the SummaryResult object itself. For that hook into
    ' SummaryResultChanged event and set the ToolTip on the SummaryResult object
    ' based on the calculated result value.
    Private Sub Dp_SummaryResultChanged(ByVal sender As Object, ByVal e As Infragistics.Windows.DataPresenter.Events.SummaryResultChangedEventArgs)
        Dim result As Object = e.SummaryResult.Value

        If e.SummaryResult.SummaryDefinition.Key = "PriceTotal" Then
            e.SummaryResult.ToolTip = String.Format("Price Total is {0:c}", result)
        End If
    End Sub
using Infragistics.Windows;
using Infragistics.Windows.Editors;
using Infragistics.Windows.DataPresenter;

		public void Window1_Loaded( object sender, RoutedEventArgs e )
		{
			_dp.DataSource = _dataSource;

			SummaryDefinition summaryDef1 = _dp.FieldLayouts[0].SummaryDefinitions.Add( 
				"PriceAverage", SummaryCalculator.Average, "Price" );

			// All summary results associated with this summary definition will use this
			// tool-tip.
			summaryDef1.ToolTip = "Price Average";

			// Add a second summary that gets used in dp_SummaryResultChanged below.
			SummaryDefinition summaryDef2 = _dp.FieldLayouts[0].SummaryDefinitions.Add(
				"PriceTotal", SummaryCalculator.Sum, "Price" );
		}

		// If the tool-tip needs to be based on the summary result value, you can 
		// set the ToolTip on the SummaryResult object itself. For that hook into
		// SummaryResultChanged event and set the ToolTip on the SummaryResult object
		// based on the calculated result value.
		public void dp_SummaryResultChanged( object sender, Infragistics.Windows.DataPresenter.Events.SummaryResultChangedEventArgs e )
		{
			object result = e.SummaryResult.Value;

			if ( e.SummaryResult.SummaryDefinition.Key == "PriceTotal" )
			{
				e.SummaryResult.ToolTip = string.Format( "Price Total is {0:c}", result );
			}
		}
<igDP:XamDataGrid x:Name="_dp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                            
SummaryResultChanged="dp_SummaryResultChanged"
                                            
>
            
            
<igDP:XamDataGrid.FieldLayouts>
                
<igDP:FieldLayout IsDefault="true" >
                    
<igDP:FieldLayout.SummaryDefinitions>
                        
<igDP:SummaryDefinition
                                
Key="PriceAverage"
                                
SourceFieldName="Price"
                                
Calculator="Average"
                                
ToolTip="Price Average"
                            
/>
                    
</igDP:FieldLayout.SummaryDefinitions>
                
</igDP:FieldLayout>
            
</igDP:XamDataGrid.FieldLayouts>
            
</igDP:XamDataGrid>
参照