'Declaration Public Property SelectedItem As Object
'Usage Dim instance As ListBox Dim value As Object instance.SelectedItem = value value = instance.SelectedItem
public object SelectedItem {get; set;}
'Declaration Public Property SelectedItem As Object
'Usage Dim instance As ListBox Dim value As Object instance.SelectedItem = value value = instance.SelectedItem
public object SelectedItem {get; set;}
When used with a data-virtualized (asynchronous) source, this property will always return null; use BeginGetSelectedItems and EndGetSelectedItems instead.
Returns null if nothing is selected or if the SelectionMode is set to SelectionMode.None. If using Multiple or Extended selection modes, returns the last item selected.
Target Platforms: Windows 11, Windows 10, 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