System.ComponentModel.Design.IComponentChangeService.OnComponentChanged Method

Announces to the component change service that a particular component has changed.

Syntax

public void OnComponentChanged (object component, System.ComponentModel.MemberDescriptor member, object oldValue, object newValue)

Parameters

component
The component that has changed.
member
The member that has changed. This is null if this change is not related to a single member.
oldValue
The old value of the member. This is valid only if the member is not null.
newValue
The new value of the member. This is valid only if the member is not null.

Remarks

This method raises the IComponentChangeService.ComponentChanged event.

Most designers that ship with the winsdklong, as well as the Visual Studio design-time environment, typically raise this event for you when a component in a project is changed, so most of the time you do not need to explicitly call this method. The appropriate System.ComponentModel.Design.IComponentChangeService events are automatically raised when a System.ComponentModel.PropertyDescriptor is used to change a property value or components are added or removed from the System.ComponentModel.Design.IDesignerHost container.

Before calling IComponentChangeService.OnComponentChanged(object, System.ComponentModel.MemberDescriptor, object, object), first call IComponentChangeService.OnComponentChanging(object, System.ComponentModel.MemberDescriptor) to indicate that a component is about to change, and make the change. Then call IComponentChangeService.OnComponentChanged(object, System.ComponentModel.MemberDescriptor, object, object) to raise the IComponentChangeService.ComponentChanged event.

Requirements

Namespace: System.ComponentModel.Design
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0