When overridden in a derived class, resets the value for this property of the component to the default value.
[Visual Basic] Public MustOverride Sub ResetValue( _ ByVal component As Object _ ) [C#] public abstract void ResetValue( object component ); [C++] public: virtual void ResetValue( Object* component ) = 0; [JScript] public abstract function ResetValue( component : Object );
- The component with the property value that is to be reset to the default value.
Typically, this method is implemented through reflection.
This method determines the value to reset the property to in the following order of precedence:
- There is a shadowed property for this property.
- There is a DefaultValueAttribute for this property.
- There is a "ResetMyProperty" method that you have implemented, where "MyProperty" is the name of the property you pass to it.
This method creates a DesignerTransaction automatically in the following order:
- The method calls IDesignerHost.CreateTransaction to create a new DesignerTransaction object to represent the changes.
- The method calls IComponentChangeService.OnComponentChanging to indicate that the transaction has begun and the changes are about to occur.
- The method resets the property to the value determined by this method's checking order.
- The method calls IComponentChangeService.OnComponentChanged to indicate that the changes have occured.
- The method calls DesignerTransaction.Commit to indicate that the transaction is completed.
The purpose of the transaction is to support Undo and Redo functionality.
Notes to Inheritors: When overridden in a derived class, this method looks for a DefaultValueAttribute. If it finds one, it sets the value of the property to the DefaultValueAttribute it found. If this method cannot find a DefaultValueAttribute, it looks for a "ResetMyProperty" method that you need to implement. If this is found, ResetValue invokes it. If ResetValue cannot find a DefaultValueAttribute or a "ResetMyProperty" method that you implemented, then it does not perform an operation.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework