ControlDesigner::AutoFormats Property

 

Gets the collection of predefined automatic formatting schemes to display in the Auto Format dialog box for the associated control at design time.

Namespace:   System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

public:
property DesignerAutoFormatCollection^ AutoFormats {
	virtual DesignerAutoFormatCollection^ get();
}

Property Value

Type: System.Web.UI.Design::DesignerAutoFormatCollection^

A DesignerAutoFormatCollection object that contains the predefined schemes for the control.

A complete Web server control includes not only the control, but also, possibly, a corresponding control designer class that is derived from the ControlDesigner class and a formatting class that is derived from the DesignerAutoFormat class. The AutoFormats property is a collection of instances of the DesignerAutoFormat class. For a working example of automatic formatting in Visual Studio 2005, see Calendar.

Notes to Inheritors:

Controls that automatically expose AutoFormats get a task list and context commands for their formats. When you are using automatic formats, use the ViewControl property to set the properties in your callback function.

The following code example demonstrates how to implement the AutoFormats property in a custom control designer. The derived control designer implements the AutoFormats property by adding three instances of a custom automatic format that are derived from the DesignerAutoFormat class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: