C# Class WinRTXamlToolkit.Controls.Extensions.RichTextBlockExtensions

Attached properties and extension methods for RichTextBlock class.
ファイルを表示 Open project: xyzzer/WinRTXamlToolkit

Public Properties

Property Type Description
LinkedHtmlFragmentProperty Windows.UI.Xaml.DependencyProperty
PlainTextProperty Windows.UI.Xaml.DependencyProperty

Public Methods

Method Description
AppendLink ( this richTextBlock, string text, Uri uri ) : void

Appends a HyperlinkButton with the given text and navigate uri to the given RichTextBlock.

AppendText ( this richTextBlock, string text ) : void

Appends a paragraph of plain text to the RichTextBlock.

GetLinkedHtmlFragment ( DependencyObject d ) : string

Gets the LinkedHtmlFragment property. This dependency property indicates the linked text that can be bound to the RichTextBlock to automatically generate inline links.

Note that only simple html text with opening and closing anchor tags and href attribute with double-quotes is supported. No escapes or other tags will be parsed.

GetPlainText ( DependencyObject d ) : string

Gets the PlainText property. This dependency property indicates the plain text to assign to the RichTextBlock.

SetLinkedHtmlFragment ( DependencyObject d, string value ) : void

Sets the LinkedHtmlFragment property. This dependency property indicates the linked text that can be bound to the RichTextBlock to automatically generate inline links.

Note that only simple html text with opening and closing anchor tags and href attribute with double-quotes is supported. No escapes or other tags will be parsed.

SetLinkedHtmlFragmentString ( this richTextBlock, string htmlFragment ) : void

Sets the linked HTML fragment.

Note that only simple html text with opening and closing anchor tags and href attribute with double-quotes is supported. No escapes or other tags will be parsed.

SetPlainText ( DependencyObject d, string value ) : void

Sets the PlainText property. This dependency property indicates the plain text to assign to the RichTextBlock.

Private Methods

Method Description
OnLinkedHtmlFragmentChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the LinkedHtmlFragment property.

OnPlainTextChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the PlainText property.

Method Details

AppendLink() public static method

Appends a HyperlinkButton with the given text and navigate uri to the given RichTextBlock.
public static AppendLink ( this richTextBlock, string text, Uri uri ) : void
richTextBlock this The rich text block.
text string The text.
uri System.Uri The URI.
return void

AppendText() public static method

Appends a paragraph of plain text to the RichTextBlock.
public static AppendText ( this richTextBlock, string text ) : void
richTextBlock this The rich text block.
text string The text.
return void

GetLinkedHtmlFragment() public static method

Gets the LinkedHtmlFragment property. This dependency property indicates the linked text that can be bound to the RichTextBlock to automatically generate inline links.
Note that only simple html text with opening and closing anchor tags and href attribute with double-quotes is supported. No escapes or other tags will be parsed.
public static GetLinkedHtmlFragment ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
return string

GetPlainText() public static method

Gets the PlainText property. This dependency property indicates the plain text to assign to the RichTextBlock.
public static GetPlainText ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
return string

SetLinkedHtmlFragment() public static method

Sets the LinkedHtmlFragment property. This dependency property indicates the linked text that can be bound to the RichTextBlock to automatically generate inline links.
Note that only simple html text with opening and closing anchor tags and href attribute with double-quotes is supported. No escapes or other tags will be parsed.
public static SetLinkedHtmlFragment ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
return void

SetLinkedHtmlFragmentString() public static method

Sets the linked HTML fragment.
Note that only simple html text with opening and closing anchor tags and href attribute with double-quotes is supported. No escapes or other tags will be parsed.
public static SetLinkedHtmlFragmentString ( this richTextBlock, string htmlFragment ) : void
richTextBlock this The rich text block.
htmlFragment string The HTML fragment.
return void

SetPlainText() public static method

Sets the PlainText property. This dependency property indicates the plain text to assign to the RichTextBlock.
public static SetPlainText ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
return void

Property Details

LinkedHtmlFragmentProperty public_oe static_oe property

LinkedHtmlFragment Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml LinkedHtmlFragmentProperty
return Windows.UI.Xaml.DependencyProperty

PlainTextProperty public_oe static_oe property

PlainText Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml PlainTextProperty
return Windows.UI.Xaml.DependencyProperty