October 2010
Intermediate to advanced
1920 pages
73h 55m
English
If you add a GridView control to a page when you are in Design view, a menu of common tasks appears above the GridView. For example, you can select a Smart Task to enable sorting or paging.
You can add your own Smart Tasks to a custom control by inheriting a new class from the base DesignerActionList class.
For example, the file in Listing 36.36 contains three classes. It contains a custom control, named the SmartImage control, which enables you to rotate and mirror images. It also contains a ControlDesigner. Finally, it contains a DesignerActionList class that contains two Smart Tasks.
Listing 36.36. SmartImage.cs

Read now
Unlock full access