IHighlightingStyleRegistry Interface
Provides the base requirements for a registry of IClassificationType to IHighlightingStyle mapping data.
public interface IHighlightingStyleRegistry : IClassificationTypeRegistry, IEnumerable<IClassificationType>, IEnumerable<KeyValuePair<IClassificationType, IHighlightingStyle>>, IEnumerable
Properties
ClassificationTypes
Gets the collection of IClassificationType objects that have been registered.
ICollection<IClassificationType> ClassificationTypes { get; }
Property Value
- ICollection<IClassificationType>:
The collection of IClassificationType objects that have been registered.
Description
Gets or sets the description of the registry.
HighlightingStyles
Gets the collection of IHighlightingStyle objects that have been registered.
ICollection<IHighlightingStyle> HighlightingStyles { get; }
Property Value
- ICollection<IHighlightingStyle>:
The collection of IHighlightingStyle objects that have been registered.
Item[IClassificationType]
Gets the IHighlightingStyle registered with the specified IClassificationType.
[C#] In C#, this property is the indexer for the IHighlightingStyleRegistry
interface.
IHighlightingStyle this[IClassificationType classificationType] { get; }
Parameter | Type | Description |
---|---|---|
classificationType | IClassificationType | The IClassificationType for which to search. |
Property Value
- IHighlightingStyle:
The IHighlightingStyle registered with the specified IClassificationType.
UnusedRegionForegroundOpacity
Gets or sets the opacity to use for unused region foregrounds.
double UnusedRegionForegroundOpacity { get; set; }
Property Value
- Double:
The opacity to use for unused region foregrounds. The default value is
0.7
.
Methods
GetClassificationType(String)
Returns the IClassificationType, if any, that has been registered with the specified key.
IClassificationType GetClassificationType(string key)
Parameter | Type | Description |
---|---|---|
key | String | The key for which to search. |
Returns
- IClassificationType:
The IClassificationType, if any, that has been registered with the specified key.
ImportHighlightingStyles(Stream)
Imports style settings from the specified Stream, containing XML.
bool ImportHighlightingStyles(Stream stream)
Parameter | Type | Description |
---|---|---|
stream | Stream | The Stream from which to import. |
Returns
- Boolean:
true
if settings were imported; otherwise,false
.
Register(IClassificationType, IHighlightingStyle)
Attempts to adds an IHighlightingStyle for the specified IClassificationType into the registry, as long as there is no existing IHighlightingStyle registered with the same IClassificationType.
bool Register(IClassificationType classificationType, IHighlightingStyle style)
Parameter | Type | Description |
---|---|---|
classificationType | IClassificationType | The IClassificationType with which to register the IHighlightingStyle. |
style | IHighlightingStyle | The IHighlightingStyle to register. |
Returns
- Boolean:
true
if the IHighlightingStyle was added; otherwise,false
.
Remarks
This method only returns false
if there is already an IHighlightingStyle
registered with the same IClassificationType.
Register(IClassificationType, IHighlightingStyle, Boolean)
Adds an IHighlightingStyle into the registry, optionally overwriting any existing IHighlightingStyle registered with the same IClassificationType.
bool Register(IClassificationType classificationType, IHighlightingStyle style, bool overwriteExisting)
Parameter | Type | Description |
---|---|---|
classificationType | IClassificationType | The IClassificationType with which to register the IHighlightingStyle. |
style | IHighlightingStyle | The IHighlightingStyle to register. |
overwriteExisting | Boolean | Whether to overwrite existing highlighting styles with the same IClassificationType. |
Returns
- Boolean:
true
if the IHighlightingStyle was added; otherwise,false
.
Remarks
This method only returns false
if overwriteExisting
is false
and there
is already an IHighlightingStyle registered with the same IClassificationType.
Unregister(IClassificationType)
Removes a registry entry with the specified IClassificationType from the registry.
bool Unregister(IClassificationType classificationType)
Parameter | Type | Description |
---|---|---|
classificationType | IClassificationType | The IClassificationType to unregister. |
Returns
- Boolean:
true
if the registry entry was removed; otherwise,false
.
Events
Changed
Occurs after a change has occurred to the items in the registry.