Occurs after the value of the
CheckState property of an
UltraListViewItem has been changed.
The event handler receives an argument of type ItemDoubleClickEventArgs containing data related to this event. The following ItemDoubleClickEventArgs properties provide information specific to this event.
The following code sample demonstrates how the UltraListView's ItemDoubleClick event can be handled to perform an action, such as opening a file, when an UltraListViewItem is double-clicked:
For an overview of how to handle events in Visual Basic or Visual C#, see
Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see
Consuming Events in the
.NET Framework Developer's Guide.
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinListView
Private Sub ultraListView1_ItemDoubleClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinListView.ItemDoubleClickEventArgs) Handles ultraListView1.ItemDoubleClick
If e.Item.Tag.GetType() Is GetType(System.IO.FileInfo) Then
Dim fileInfo As FileInfo = CType(e.Item.Tag, System.IO.FileInfo)
If Not fileInfo Is Nothing AndAlso fileInfo.Extension.ToLower() = ".txt" Then
Dim psi As ProcessStartInfo = New ProcessStartInfo("notepad.exe", fileInfo.FullName)
Process.Start(psi)
End If
End If
End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinListView;
using System.Diagnostics;
private void ultraListView1_ItemDoubleClick(object sender, Infragistics.Win.UltraWinListView.ItemDoubleClickEventArgs e)
{
FileInfo fileInfo = e.Item.Tag as FileInfo;
if ( fileInfo != null && fileInfo.Extension.ToLower() == ".txt" )
{
ProcessStartInfo psi = new ProcessStartInfo( "notepad.exe", fileInfo.FullName );
Process.Start( psi );
}
}
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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