EditorFormatDefinition Class

Provides format information for a particular item.

Namespace:  Microsoft.VisualStudio.Text.Classification
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

public abstract class EditorFormatDefinition

The EditorFormatDefinition type exposes the following members.

  NameDescription
Protected methodEditorFormatDefinitionInitializes a new instance of EditorFormatDefinition.
Top

  NameDescription
Public propertyBackgroundBrushGets or sets the background brush for this item.
Public propertyBackgroundColorGets or sets the background color for this item.
Public propertyBackgroundCustomizableDetermines whether the background of this format is customizable.
Public propertyDisplayNameDefines the string used when displaying this format definition to the user. This property is used only if the UserVisibleAttribute is set to true on this object's export.
Public propertyForegroundBrushGets or sets the foreground brush for this item.
Public propertyForegroundColorGets or sets the foreground color for this item.
Public propertyForegroundCustomizableDetermines whether the foreground of this format is customizable.
Top

  NameDescription
Public methodCreateResourceDictionaryCreates a ResourceDictionary from this definition.
Protected methodCreateResourceDictionaryFromDefinitionCreates a ResourceDictionary from this definition.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberBackgroundBrushIdDefines the string used to look up the background brush value in the ResourceDictionary.
Public fieldStatic memberBackgroundColorIdDefines the string used to look up the background color value in the ResourceDictionary.
Public fieldStatic memberForegroundBrushIdDefines the string used to look up the foreground brush value in the ResourceDictionary.
Public fieldStatic memberForegroundColorIdDefines the string used to look up the foreground color value in the ResourceDictionary.
Top

This is a MEF component part, and should be exported as:

[Export(typeof(EditorFormatDefinition))] 

Exporters must provide a NameAttribute. The attributes OrderAttribute, DisplayNameAttribute and UserVisibleAttribute are optional.

Consumers of this attribute may optionally ignore the foreground formatting information, the background information, or both.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft