Announces to the component change service that a particular component is changing.
[Visual Basic] Sub OnComponentChanging( _ ByVal component As Object, _ ByVal member As MemberDescriptor _ ) [C#] void OnComponentChanging( object component, MemberDescriptor member ); [C++] void OnComponentChanging( Object* component, MemberDescriptor* member ) = 0; [JScript] function OnComponentChanging( component : Object, member : MemberDescriptor );
This event is called when a property is about to change. The framework typically calls this event for you, so most of the time you don't need to explictly call it.
The property descriptor calls this method before it commits the property. This method should throw an exception if the property cannot be changed. This is not intended to validate the values of a particular property. Instead, it is intended to provide a global method of preventing a component from changing. For example, if a designer file is checked into source code control, this event's handler would typically throw an exception if the user refused to check out the file.
IComponentChangeService Interface | IComponentChangeService Members | System.ComponentModel.Design Namespace | System.ComponentModel.Design.MemberDescriptor