Bewerken

Share via


BindingList<T>.ListChanged Event

Definition

Occurs when the list or an item in the list changes.

public:
 virtual event System::ComponentModel::ListChangedEventHandler ^ ListChanged;
public event System.ComponentModel.ListChangedEventHandler ListChanged;
member this.ListChanged : System.ComponentModel.ListChangedEventHandler 
Public Custom Event ListChanged As ListChangedEventHandler 

Event Type

Implements

Examples

The following code example demonstrates how handle the ListChanged event. For the complete example, see the BindingList<T> class overview topic.

void listOfParts_ListChanged(object sender, ListChangedEventArgs e)
{
    MessageBox.Show(e.ListChangedType.ToString());
}

Remarks

ListChanged notifications for item value changes are only raised if the list item type implements the INotifyPropertyChanged interface.

For more information about how to handle events, see Handling and Raising Events.

Applies to

See also