Deleting Multiple Selected Items in WPF

Rahul Pulikkot Nath
Rahul Pulikkot Nath

Table of Contents

Hi, Many a times while using listbox,listview etc there might be a need to delete the multiple selected items. This can be easily achieved by the following piece of code

 While ControlName.SelectedItems.Count > 0 
   ControlName.Items.Remove(ControlName.SelectedItem)
End While

Happy Coding :)

WPF