Compartilhar via


ClassificationFormatDefinition Class

Provides classification format information for a particular classification type.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition
    Microsoft.VisualStudio.Text.Classification.ClassificationFormatDefinition

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

Syntax

'Declaration
Public MustInherit Class ClassificationFormatDefinition _
    Inherits EditorFormatDefinition
public abstract class ClassificationFormatDefinition : EditorFormatDefinition
public ref class ClassificationFormatDefinition abstract : public EditorFormatDefinition
[<AbstractClass>]
type ClassificationFormatDefinition =  
    class 
        inherit EditorFormatDefinition 
    end
public abstract class ClassificationFormatDefinition extends EditorFormatDefinition

The ClassificationFormatDefinition type exposes the following members.

Constructors

  Name Description
Protected method ClassificationFormatDefinition Initializes a new instance of ClassificationFormatDefinition.

Top

Properties

  Name Description
Public property BackgroundBrush Gets or sets the background brush for this item. (Inherited from EditorFormatDefinition.)
Public property BackgroundColor Gets or sets the background color for this item. (Inherited from EditorFormatDefinition.)
Public property BackgroundCustomizable Determines whether the background of this format is customizable. (Inherited from EditorFormatDefinition.)
Public property BackgroundOpacity Gets or sets the opacity of the background.
Public property CultureInfo Gets or sets the CultureInfo for this classification format.
Public property 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. (Inherited from EditorFormatDefinition.)
Public property FontHintingSize Gets or sets the font hinting size for this classification format.
Public property FontRenderingSize Gets or sets the font rendering size for this classification format.
Public property FontTypeface Gets or sets the Typeface for this classification format.
Public property ForegroundBrush Gets or sets the foreground brush for this item. (Inherited from EditorFormatDefinition.)
Public property ForegroundColor Gets or sets the foreground color for this item. (Inherited from EditorFormatDefinition.)
Public property ForegroundCustomizable Determines whether the foreground of this format is customizable. (Inherited from EditorFormatDefinition.)
Public property ForegroundOpacity Gets or sets the opacity of the foreground.
Public property IsBold Determines whether the text should be bold.
Public property IsItalic Determines whether the text should be italic.
Public property TextDecorations Gets or sets the TextDecorationCollection for this classification format.
Public property TextEffects Gets or sets the the TextEffectCollection for this classification format.

Top

Methods

  Name Description
Public method CreateResourceDictionary Creates a ResourceDictionary from this definition. (Inherited from EditorFormatDefinition.)
Protected method CreateResourceDictionaryFromDefinition Creates a ResourceDictionary using this definition. (Overrides EditorFormatDefinition.CreateResourceDictionaryFromDefinition().)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member BackgroundOpacityId Defines the string used to look up the background opacity value in the ResourceDictionary.
Public fieldStatic member CultureInfoId Defines the string used to look up the CultureInfo value in the ResourceDictionary.
Public fieldStatic member DefaultBackgroundOpacity Defines the default opacity used for the background color/brush if no BackgroundOpacityId entities are defined.
Public fieldStatic member DefaultHighContrastBackgroundOpacity
Public fieldStatic member FontHintingSizeId Defines the string used to look up the font hinting size value in the ResourceDictionary.
Public fieldStatic member FontRenderingSizeId Defines the string used to look up the font rendering size value in the ResourceDictionary.
Public fieldStatic member ForegroundOpacityId Defines the string used to look up the foreground opacity value in the ResourceDictionary.
Public fieldStatic member IsBoldId Defines the string used to look up the bold value in the ResourceDictionary.
Public fieldStatic member IsItalicId Defines the string used to look up the italic value in the ResourceDictionary.
Public fieldStatic member TextDecorationsId Defines the string used to look up the text decorations value in the ResourceDictionary.
Public fieldStatic member TextEffectsId Defines the string used look up the text effects value in the ResourceDictionary.
Public fieldStatic member TypefaceId Defines the string used o look up the typeface value in the ResourceDictionary.

Top

Remarks

This is a MEF component part, and should be exported as: [Export(typeof(EditorFormatDefinition))] 

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Text.Classification Namespace