HtmlContentProvider Class
Provides IntelliPrompt content based on a specified HTML-like string.
public class HtmlContentProvider : IContentProvider
- Inheritance:
- object object
- Implements:
- IContentProvider
Constructors
HtmlContentProvider(string, Color?)
Provides IntelliPrompt content based on a specified HTML-like string.
public HtmlContentProvider(string htmlSnippet, Color? backgroundColorHint = null)
| Parameter | Type | Description |
|---|---|---|
| htmlSnippet | string | The HTML snippet string to use as content. |
| backgroundColorHint | Color? | The content host's background color. |
Properties
BackgroundColorHint
The content host's background color, if known.
public Color? BackgroundColorHint { get; set; }
Property Value
Remarks
This property can be used when selecting an image to ensure it is appropriate for the supplied background.
HtmlSnippet
The HTML snippet string to use as content.
Methods
Escape(string?)
Escapes the specified text to remove all special meaning from XML characters.
public static string? Escape(string? text)
| Parameter | Type | Description |
|---|---|---|
| text | string | The text to escape. |
Returns
- string:
The escaped text.
Remarks
Use this method to escape text for the quick info, parameter info, or completion list item descriptions in situations
where the text may contain XML control characters (such as <) and no special formatting is needed.
In addition, line terminator characters are converted to <br />> tags.
GetCommentForegroundColor(IHighlightingStyleRegistry?)
Returns the foreground color to use for comments.
public static UIColor GetCommentForegroundColor(IHighlightingStyleRegistry? registry)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified. |
Returns
GetContent()
Returns the content to use in various IntelliPrompt popups.
GetImage(string)
Returns the Image to use that is referenced by source.
protected virtual Image? GetImage(string source)
| Parameter | Type | Description |
|---|---|---|
| source | string | A string image source reference. |
Returns
GetKeywordForegroundColor(IHighlightingStyleRegistry?)
Returns the foreground color to use for keywords.
public static UIColor GetKeywordForegroundColor(IHighlightingStyleRegistry? registry)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified. |
Returns
GetSecondaryTextForegroundColor(IHighlightingStyleRegistry?)
Returns the foreground color to use for neutral content.
public static UIColor GetSecondaryTextForegroundColor(IHighlightingStyleRegistry? registry)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified. |
Returns
GetTypeNameForegroundColor(IHighlightingStyleRegistry?)
Returns the foreground color to use for type names.
public static UIColor GetTypeNameForegroundColor(IHighlightingStyleRegistry? registry)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified. |
Returns
ResolveForegroundColor(IHighlightingStyleRegistry?, IClassificationType?, IHighlightingStyleColorPalette?, IHighlightingStyleColorPalette?, Color)
Resolves the foreground UIColor for an IClassificationType in a highlighting style registry.
public static UIColor ResolveForegroundColor(IHighlightingStyleRegistry? registry, IClassificationType? classificationType, IHighlightingStyleColorPalette? lightColorPalette, IHighlightingStyleColorPalette? darkColorPalette, Color defaultColor)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified. |
| classificationType | IClassificationType | The IClassificationType for which to search. |
| lightColorPalette | IHighlightingStyleColorPalette | The optional color palette of light colors. |
| darkColorPalette | IHighlightingStyleColorPalette | The optional color palette of dark colors. |
| defaultColor | Color | The default color to use if no highlighting style entry was found. |
Returns
ResolveForegroundColor(IHighlightingStyleRegistry?, IClassificationType?, Color)
Resolves the foreground UIColor for an IClassificationType in a highlighting style registry.
public static UIColor ResolveForegroundColor(IHighlightingStyleRegistry? registry, IClassificationType? classificationType, Color defaultColor)
| Parameter | Type | Description |
|---|---|---|
| registry | IHighlightingStyleRegistry | The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified. |
| classificationType | IClassificationType | The IClassificationType for which to search. |
| defaultColor | Color | The default color to use if no highlighting style entry was found. |
Returns
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()