EditorFormatDefinition Class

Definition

Provides format information for a particular item.

public abstract class EditorFormatDefinition
Inheritance
EditorFormatDefinition
Derived

Remarks

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

[Export(typeof(EditorFormatDefinition))]   

Exporters must provide a NameAttribute. The attributes OrderAttribute, <xref:Microsoft.VisualStudio.Text.Classification.DisplayNameAttribute> and UserVisibleAttribute are optional.

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

Constructors

EditorFormatDefinition()

Initializes a new instance of EditorFormatDefinition.

Fields

BackgroundBrushId

Defines the string used to look up the background brush value in the ResourceDictionary.

BackgroundColorId

Defines the string used to look up the background color value in the ResourceDictionary.

ForegroundBrushId

Defines the string used to look up the foreground brush value in the ResourceDictionary.

ForegroundColorId

Defines the string used to look up the foreground color value in the ResourceDictionary.

Properties

BackgroundBrush

Gets or sets the background brush for this item.

BackgroundColor

Gets or sets the background color for this item.

BackgroundCustomizable

Determines whether the background of this format is customizable.

DisplayName

Defines 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.

ForegroundBrush

Gets or sets the foreground brush for this item.

ForegroundColor

Gets or sets the foreground color for this item.

ForegroundCustomizable

Determines whether the foreground of this format is customizable.

Methods

CreateResourceDictionary()

Creates a ResourceDictionary from this definition.

CreateResourceDictionaryFromDefinition()

Creates a ResourceDictionary from this definition.

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to