DesignerAutoFormatCollection Class
Assembly: System.Design (in system.design.dll)
The ControlDesigner class and any derived class defines the AutoFormats property as a DesignerAutoFormatCollection object. Control developers can override the AutoFormats property in a derived control designer, add custom automatic formatting styles, and return the collection of supported formats to the visual designer.
The collection dynamically increases as objects are added. Indexes in this collection are zero-based. Use the Count property to determine how many automatic style formats are in the collection.
Additionally, use the DesignerAutoFormatCollection methods and properties to provide the following functionality:
-
The Add method to add a single format to the collection.
-
The Insert method to add a format at a particular index within the collection.
-
The Remove method to remove a format.
-
The RemoveAt method to remove the format at a particular index.
-
The Contains method to determine whether a particular format is already in the collection.
-
The IndexOf method to retrieve the index of a format within the collection.
-
The Item property to get or set the format at a particular index, using array notation.
-
The Clear method to remove all formats from the collection.
-
The Count property to determine the number of formats in the collection.
-
The IndexOf method to get the position of a format within the collection.
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.