Prev | Current Page 720 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"


If the user clicks OK to set any changes, this code notifies Visual Studio that the component has
changed:
changeSrvc.OnComponentChanged( (TitledThumbnail)component, null, null, null);
The next step is to either commit or cancel the DesignerTransaction, depending on whether
or not the user clicked OK or Cancel on the component editor dialog box. That??™s it for the
TitledThumbnailComponentEditor class.
When the TitledThumbnail server control is selected in the Visual Studio Designer, a Property
Builder hyperlink appears at the bottom of the Properties window. Also, if you right-click the
TitledThumbnail server control, you will see a context menu item titled with the same text. A
custom designer provides this functionality and is the topic of the next section.
Custom Designers
The Designer classes in .NET customize how components in Windows Forms and server
controls in ASP.NET appear and behave at design time. You can implement custom designers
to perform custom initialization, access design-time services such as template editing, add
menu items to context menus, or to adjust the attributes, events, and properties available in a
server control.
?– Note You can use type converters and UI type editors both at design time and at runtime.


Pages:
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732