FormattedTextConverter

Converts a string containing special format tokens to an Inline enumerable, to be used with the TextBlock control.
This converter is also a TypeConverter.

Supported markup:

  • Use [element] to start and [/] to end (you can also specify [/element], but the converter does not check for matching tags).
  • [b] for bold.
  • [i] for italics.
  • [u] for underline.
  • [h url] for hyperlink.
  • [nl/] for line break.

Example:

    <TextBlock av:BindingHelpers.Inlines="this is a [b][i]formatted[/][/] piece of [h http://www.codeplex.com/wpfcontrib/]text[/]" />

See also:

Last edited Aug 11, 2007 at 3:07 PM by aelij, version 3