IHighlightingStyleColorPalette Interface
Provides the base requirements for a palette of colors to be used with a IHighlightingStyle.
public interface IHighlightingStyleColorPalette
Remarks
An IHighlightingStyle will typically only read colors from the color palette for colors that are supported by the IHighlightingStyle.
Properties
Keys
An enumerable of keys currently associated with one or more colors.
Name
The name of the color palette.
Methods
ClearAll()
Clears all colors defined in the color palette.
void ClearAll()
ClearKey(string)
Clears all colors defined in the color palette for the given key.
void ClearKey(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
ContainsKey(string)
Tests if one or more colors are available for the given key.
bool ContainsKey(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
Returns
- bool:
true
if at least one color is available for the given key; otherwisefalse
.
GetBackground(string)
Gets the background color, if any, associated with the given key.
Color? GetBackground(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
Returns
- Color?:
The background color for the given key, or
null
if a color is not defined for the key.
GetBorder(string)
Gets the border color, if any, associated with the given key.
Color? GetBorder(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
Returns
- Color?:
The border color for the given key, or
null
if a color is not defined for the key.
GetForeground(string)
Gets the foreground color, if any, associated with the given key.
Color? GetForeground(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
Returns
- Color?:
The foreground color for the given key, or
null
if a color is not defined for the key.
GetStrikethrough(string)
Gets the strikethrough color, if any, associated with the given key.
Color? GetStrikethrough(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
Returns
- Color?:
The strikethrough color for the given key, or
null
if a color is not defined for the key.
GetUnderline(string)
Gets the underline color, if any, associated with the given key.
Color? GetUnderline(string key)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
Returns
- Color?:
The underline color for the given key, or
null
if a color is not defined for the key.
SetBackground(string, Color?)
Sets the background color, if any, to be associated with the given key. If the key is already assigned a color, it will not overwrite the existing color.
bool SetBackground(string key, Color? color)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
Returns
- bool:
true
if the color was added; otherwise,false
.
SetBackground(string, Color?, bool)
Sets the background color, if any, to be associated with the given key.
bool SetBackground(string key, Color? color, bool overwriteExisting)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
overwriteExisting | bool |
|
Returns
- bool:
true
if the color was added; otherwise,false
.
SetBorder(string, Color?)
Sets the border color, if any, to be associated with the given key. If the key is already assigned a color, it will not overwrite the existing color.
bool SetBorder(string key, Color? color)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
Returns
- bool:
true
if the color was added; otherwise,false
.
SetBorder(string, Color?, bool)
Sets the border color, if any, to be associated with the given key.
bool SetBorder(string key, Color? color, bool overwriteExisting)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
overwriteExisting | bool |
|
Returns
- bool:
true
if the color was added; otherwise,false
.
SetForeground(string, Color?)
Sets the foreground color, if any, to be associated with the given key. If the key is already assigned a color, it will not overwrite the existing color.
bool SetForeground(string key, Color? color)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
Returns
- bool:
true
if the color was added; otherwise,false
.
SetForeground(string, Color?, bool)
Sets the foreground color, if any, to be associated with the given key.
bool SetForeground(string key, Color? color, bool overwriteExisting)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
overwriteExisting | bool |
|
Returns
- bool:
true
if the color was added; otherwise,false
.
SetStrikethrough(string, Color?)
Sets the strikethrough color, if any, to be associated with the given key. If the key is already assigned a color, it will not overwrite the existing color.
bool SetStrikethrough(string key, Color? color)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
Returns
- bool:
true
if the color was added; otherwise,false
.
SetStrikethrough(string, Color?, bool)
Sets the strikethrough color, if any, to be associated with the given key.
bool SetStrikethrough(string key, Color? color, bool overwriteExisting)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
overwriteExisting | bool |
|
Returns
- bool:
true
if the color was added; otherwise,false
.
SetUnderline(string, Color?)
Sets the underline color, if any, to be associated with the given key. If the key is already assigned a color, it will not overwrite the existing color.
bool SetUnderline(string key, Color? color)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
Returns
- bool:
true
if the color was added; otherwise,false
.
SetUnderline(string, Color?, bool)
Sets the underline color, if any, to be associated with the given key.
bool SetUnderline(string key, Color? color, bool overwriteExisting)
Parameter | Type | Description |
---|---|---|
key | string | The key, which is typically matches an IClassificationType key. |
color | Color? | The color to be assigned. |
overwriteExisting | bool |
|
Returns
- bool:
true
if the color was added; otherwise,false
.