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)

Initializes a new instance of the HtmlContentProvider class.

public HtmlContentProvider(string htmlSnippet)
Parameter Type Description
htmlSnippet string

The HTML snippet string to use as content.

HtmlContentProvider(string, Color)

Initializes a new instance of the HtmlContentProvider class.

public HtmlContentProvider(string htmlSnippet, Color backgroundColorHint)
Parameter Type Description
htmlSnippet string

The HTML snippet string to use as content.

backgroundColorHint Color

The content host's background color.

Properties

BackgroundColorHint

Gets or sets the content host's background color, if known.

public Color? BackgroundColorHint { get; set; }

Property Value

Color?:

The content host's background color, if known.

Remarks

This property can be used when selecting an image to ensure it is appropriate for the supplied background.

HtmlSnippet

Gets or sets the HTML snippet string to use as content.

public string HtmlSnippet { get; set; }

Property Value

string:

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 specified text to remove all special meaning from XML characters.

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, \n (line feed) 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:

The foreground color to use for comments.

GetContent()

Returns the content to use in the quick info popup.

public virtual object GetContent()

Returns

object:

The content to use in the quick info popup.

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:

The Image to use that is referenced by source.

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:

The foreground color to use for keywords.

GetNeutralForegroundColor(IHighlightingStyleRegistry)

Returns the foreground color to use for neutral content.

public static UIColor GetNeutralForegroundColor(IHighlightingStyleRegistry registry)
Parameter Type Description
registry IHighlightingStyleRegistry

The IHighlightingStyleRegistry to use. The AmbientHighlightingStyleRegistry is used if no registry is specified.

Returns

UIColor:

The foreground color to use for neutral content.

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:

The foreground color to use for type names.

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:

The foreground UIColor for an IClassificationType in the ambient highlighting style registry.

Inherited Members