dotnetmonitor.com |
|
|||||||||||
| There are two ways to do it. The most common is
to override the DesignerActionListCollection property on the ComponentDesigner
attached to your control. The SmartTagSample project shows this method.
The other way is to get a hold of the DesignerActionService and directly add a DesignerActionList to a specific control or component. The advantage of this method is that you dont need access to a controls designer and can add global smart tags with this. For example you could use the DesignerActionService to add a Do Foo smart tag item to every Button on the design surface. The SmartTagMerging project uses the DesignerActionService to do just this.
The CustomDataGridViewSmartTag project shows using the DesignerActionService to add a DesignerActionList to a control without modifying its designer. |
|||||||||||