'Declaration Public Event ItemDoubleClick As ItemDoubleClickEventHandler
public event ItemDoubleClickEventHandler ItemDoubleClick
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.
Property | Description |
---|---|
Item (Inherited from Infragistics.Win.UltraWinListView.ItemEventArgs) | Returns the UltraListViewItem with which this instance is associated. |
The UltraListView control does not expose an 'ItemClick' event; use the ItemActivated event if your application requires a notification when the end user navigates to a different UltraListViewItem.
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