'宣言 Public Property ItemSelectionStrategyFilter As Infragistics.Win.ISelectionStrategyFilter
public Infragistics.Win.ISelectionStrategyFilter ItemSelectionStrategyFilter {get; set;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinListView Me.ultraListView1.ItemSelectionStrategyFilter = New SelectionStrategyFilter(Me.ultraListView1) Public Class SelectionStrategyFilter Implements ISelectionStrategyFilter Private listView As UltraListView = Nothing Public Sub New(ByVal listView As UltraListView) MyBase.New() Me.listView = listView End Sub Public Overridable Overloads Function GetSelectionStrategy(ByVal selectableItem As Infragistics.Shared.ISelectableItem) As ISelectionStrategy Implements ISelectionStrategyFilter.GetSelectionStrategy Return New SelectionStrategyContiguous(Me.listView) End Function End Class
using Infragistics.Win; using Infragistics.Win.UltraWinListView; using System.Diagnostics; this.ultraListView1.ItemSelectionStrategyFilter = new SelectionStrategyFilter( this.ultraListView1 ); public class SelectionStrategyFilter : ISelectionStrategyFilter { private UltraListView listView = null; public SelectionStrategyFilter( UltraListView listView ) { this.listView = listView; } ISelectionStrategy ISelectionStrategyFilter.GetSelectionStrategy( Infragistics.Shared.ISelectableItem selectableItem ) { return new SelectionStrategyContiguous( this.listView ); } }