January 2002
Intermediate to advanced
288 pages
5h 48m
English
To specify the designer for a control, the System.ComponentMode.Design.DesignerAttribute is used to decorate the control class. The word decorate is used to denote the fact that the DesignerAttribute provides extra information about the control class. The control class itself does not use the specified designer class; however, VS .NET uses this information to locate and create the specified designer. In the case of the IconButton, the DesignerAttribute would be declared as shown here:
1: [
2: System.ComponentModel.Design.Designer (
3: typeof( SAMS.ToolKit.Design.IconButtonDesigner )
4: )
5: ]
6: public class IconButton : ... { //rest of class }
The declaration for the designer assumes that the IconButtonDesigner resides in ...