This documentation is archived and is not being maintained.

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:
virtual property DesignerAutoFormatCollection^ AutoFormats {
	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

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: