I have an UltraListView (View = List) with icons and check boxes enabled. How do I capture mouse clicks on the icon?
void listView_MouseClick(object sender, MouseEventArgs e){ UltraListView listView = sender as UltraListView; UltraListViewUIElement controlElement = listView.UIElement; ImageUIElement imageElement = controlElement.ElementFromPoint( e.Location ) as ImageUIElement;
if ( imageElement != null ) { UltraListViewItem item = imageElement.GetContext( typeof(UltraListViewItem) ) as UltraListViewItem;
if ( item != null ) this.OnImageClick( item ); }}
private void OnImageClick( UltraListViewItem item ){}