ControlDesigner.AutoFormats Property

Note: This property is new in the .NET Framework version 2.0.

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 */
public DesignerAutoFormatCollection get_AutoFormats ()

public function get AutoFormats () : DesignerAutoFormatCollection

Property Value

A DesignerAutoFormatCollection 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.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0
Show: