MarkerFormatDefinition MarkerFormatDefinition MarkerFormatDefinition MarkerFormatDefinition MarkerFormatDefinition MarkerFormatDefinition Class

Definition

Provides coloring information for text markers.

public ref class MarkerFormatDefinition abstract : Microsoft::VisualStudio::Text::Classification::EditorFormatDefinition
[Windows::Foundation::Metadata::WebHostHidden]
public ref class MarkerFormatDefinition abstract : Microsoft::VisualStudio::Text::Classification::EditorFormatDefinition
[Windows::Foundation::Metadata::WebHostHidden]
class MarkerFormatDefinition abstract : Microsoft::VisualStudio::Text::Classification::EditorFormatDefinition
public abstract class MarkerFormatDefinition : Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition
type MarkerFormatDefinition = class
    inherit EditorFormatDefinition
Public MustInherit Class MarkerFormatDefinition
Inherits EditorFormatDefinition
Inheritance
MarkerFormatDefinitionMarkerFormatDefinitionMarkerFormatDefinitionMarkerFormatDefinitionMarkerFormatDefinitionMarkerFormatDefinition

Remarks

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

Exporters must provide the attribute NameAttribute.

The MarkerFormatDefinition is consumed by the default visual manager for the TextMarkerTag. The Type property should correspond to the NameAttribute of this export so that the desired color can be correctly loaded for the text marker.

If you wish your MarkerFormatDefinition to interact with Visual Studio, then set the UserVisibleAttribute on your export to true and make sure you set BackgroundColor and ForegroundColor. The foreground brush will be used to draw the border and the background brush will be used to draw the fill.

[Export(typeof(EditorFormatDefinition))] [Name("MarkerFormatDefinition/RedMarker")] [UserVisible(true)] private VisualStudioRedMarker : MarkerFormatDefinition { VisualStudioRedMarker() { this.BackgroundColor = Colors.Red; this.ForegroundColor = Colors.Blue; this.DisplayName = "Red Marker"; //this value should be localized this.ZOrder = 5; } }

Constructors

MarkerFormatDefinition() MarkerFormatDefinition() MarkerFormatDefinition() MarkerFormatDefinition() MarkerFormatDefinition() MarkerFormatDefinition()

Initializes a new instance of MarkerFormatDefinition.

Fields

BackgroundBrushId BackgroundBrushId BackgroundBrushId BackgroundBrushId BackgroundBrushId BackgroundBrushId

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

(Inherited from EditorFormatDefinition)
BackgroundColorId BackgroundColorId BackgroundColorId BackgroundColorId BackgroundColorId BackgroundColorId

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

(Inherited from EditorFormatDefinition)
BorderId BorderId BorderId BorderId BorderId BorderId

Defines the string used to look up the border pen value in the ResourceDictionary.

FillId FillId FillId FillId FillId FillId

Defines the string used to lookup the fill brush value in the ResourceDictionary.

ForegroundBrushId ForegroundBrushId ForegroundBrushId ForegroundBrushId ForegroundBrushId ForegroundBrushId

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

(Inherited from EditorFormatDefinition)
ForegroundColorId ForegroundColorId ForegroundColorId ForegroundColorId ForegroundColorId ForegroundColorId

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

(Inherited from EditorFormatDefinition)
ZOrderId ZOrderId ZOrderId ZOrderId ZOrderId ZOrderId

Defines the string used to lookup the z-order value in the ResourceDictionary.

Properties

BackgroundBrush BackgroundBrush BackgroundBrush BackgroundBrush BackgroundBrush BackgroundBrush

Gets or sets the background brush for this item.

(Inherited from EditorFormatDefinition)
BackgroundColor BackgroundColor BackgroundColor BackgroundColor BackgroundColor BackgroundColor

Gets or sets the background color for this item.

(Inherited from EditorFormatDefinition)
BackgroundCustomizable BackgroundCustomizable BackgroundCustomizable BackgroundCustomizable BackgroundCustomizable BackgroundCustomizable

Determines whether the background of this format is customizable.

(Inherited from EditorFormatDefinition)
Border Border Border Border Border Border

The pen is used to draw the border of the text marker.

DisplayName DisplayName DisplayName DisplayName DisplayName DisplayName

Defines the string used when displaying this format definition to the user. This property is only used if the UserVisibleAttribute is set to true on this object's export.

(Inherited from EditorFormatDefinition)
Fill Fill Fill Fill Fill Fill

The brush is used to paint the inner body of the text marker.

ForegroundBrush ForegroundBrush ForegroundBrush ForegroundBrush ForegroundBrush ForegroundBrush

Gets or sets the foreground brush for this item.

(Inherited from EditorFormatDefinition)
ForegroundColor ForegroundColor ForegroundColor ForegroundColor ForegroundColor ForegroundColor

Gets or sets the foreground color for this item.

(Inherited from EditorFormatDefinition)
ForegroundCustomizable ForegroundCustomizable ForegroundCustomizable ForegroundCustomizable ForegroundCustomizable ForegroundCustomizable

Determines whether the foreground of this format is customizable.

(Inherited from EditorFormatDefinition)
ZOrder ZOrder ZOrder ZOrder ZOrder ZOrder

The Z-Order is used as the Z-Order of the marker when it's drawn on the text marker adornment layer. This property can be used to specify in which order multiple markers should be drawn when they all overlap the same span of text.

Methods

CreateResourceDictionary() CreateResourceDictionary() CreateResourceDictionary() CreateResourceDictionary() CreateResourceDictionary() CreateResourceDictionary()

Creates a ResourceDictionary from this definition.

(Inherited from EditorFormatDefinition)
CreateResourceDictionaryFromDefinition() CreateResourceDictionaryFromDefinition() CreateResourceDictionaryFromDefinition() CreateResourceDictionaryFromDefinition() CreateResourceDictionaryFromDefinition() CreateResourceDictionaryFromDefinition()

Creates a ResourceDictionary using this definition.

Extension Methods

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

Microsoft internal use only.

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

Microsoft internal use only.

Applies to