ComponentDesigner.OnSetComponentDefaults Method
NOTE: This method is now obsolete.
Sets the default properties for the component. Namespace: System.ComponentModel.DesignAssembly: System.Design (in system.design.dll)
[ObsoleteAttribute(L"This method has been deprecated. Use InitializeNewComponent instead. http://go.microsoft.com/fwlink/?linkid=14202")] public: virtual void OnSetComponentDefaults ()
/** @attribute ObsoleteAttribute("This method has been deprecated. Use InitializeNewComponent instead. http://go.microsoft.com/fwlink/?linkid=14202") */
public void OnSetComponentDefaults ()
ObsoleteAttribute("This method has been deprecated. Use InitializeNewComponent instead. http://go.microsoft.com/fwlink/?linkid=14202") public function OnSetComponentDefaults ()
Not applicable.
OnSetComponentDefaults is called when the designer is initialized. This allows the designer to provide default values for the base component.
This method is called only once: when you first create the component by dragging it from the Toolbox to the design surface. Subsequent initializations of the designer do not invoke this method.
The default implementation of this method sets the default property of the component to the name of the component if the default property is a string and the property is not already set. This method can be implemented in a derived class to customize the initialization of the component that this designer is designing.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.