In This Article

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

Color?

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.

public string HtmlSnippet { get; set; }

Property Value

string

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

UIColor

GetContent()

Returns the content to use in various IntelliPrompt popups.

public virtual object? GetContent()

Returns

object

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

Image

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

UIColor

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

UIColor

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

UIColor

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

UIColor

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

UIColor

Inherited Members

Extension Methods