RichSuggestBox Class

Definition

The RichSuggestBox control extends Windows.UI.Xaml.Controls.RichEditBox control that suggests and embeds custom data in a rich document.

[Windows.UI.Xaml.TemplatePart(Name="RichEditBox", Type=typeof(Windows.UI.Xaml.Controls.RichEditBox))]
[Windows.UI.Xaml.TemplatePart(Name="SuggestionsPopup", Type=typeof(Windows.UI.Xaml.Controls.Primitives.Popup))]
[Windows.UI.Xaml.TemplatePart(Name="SuggestionsList", Type=typeof(Windows.UI.Xaml.Controls.ListViewBase))]
[Windows.UI.Xaml.TemplatePart(Name="SuggestionsContainer", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="HeaderContentPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))]
[Windows.UI.Xaml.TemplatePart(Name="DescriptionPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))]
public class RichSuggestBox : Windows.UI.Xaml.Controls.ItemsControl
[<Windows.UI.Xaml.TemplatePart(Name="RichEditBox", Type=typeof(Windows.UI.Xaml.Controls.RichEditBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="SuggestionsPopup", Type=typeof(Windows.UI.Xaml.Controls.Primitives.Popup))>]
[<Windows.UI.Xaml.TemplatePart(Name="SuggestionsList", Type=typeof(Windows.UI.Xaml.Controls.ListViewBase))>]
[<Windows.UI.Xaml.TemplatePart(Name="SuggestionsContainer", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="HeaderContentPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))>]
[<Windows.UI.Xaml.TemplatePart(Name="DescriptionPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))>]
type RichSuggestBox = class
    inherit ItemsControl
Public Class RichSuggestBox
Inherits ItemsControl
Inheritance
Windows.UI.Xaml.Controls.ItemsControl
RichSuggestBox
Attributes
Windows.UI.Xaml.TemplatePartAttribute

Constructors

RichSuggestBox()

Initializes a new instance of the RichSuggestBox class.

Fields

ClipboardCopyFormatProperty

Identifies the ClipboardCopyFormat dependency property.

ClipboardPasteFormatProperty

Identifies the ClipboardPasteFormat dependency property.

DescriptionProperty

Identifies the Description dependency property.

DisabledFormattingAcceleratorsProperty

Identifies the DisabledFormattingAccelerators dependency property.

HeaderProperty

Identifies the Header dependency property.

HeaderTemplateProperty

Identifies the HeaderTemplate dependency property.

PlaceholderTextProperty

Identifies the PlaceholderText dependency property.

PopupCornerRadiusProperty

Identifies the PopupCornerRadius dependency property.

PopupFooterProperty

Identifies the PopupFooter dependency property.

PopupFooterTemplateProperty

Identifies the PopupFooterTemplate dependency property.

PopupHeaderProperty

Identifies the PopupHeader dependency property.

PopupHeaderTemplateProperty

Identifies the PopupHeaderTemplate dependency property.

PopupPlacementProperty

Identifies the PopupPlacement dependency property.

PrefixesProperty

Identifies the Prefixes dependency property.

RichEditBoxStyleProperty

Identifies the RichEditBoxStyle dependency property.

TokenBackgroundProperty

Identifies the TokenBackground dependency property.

TokenForegroundProperty

Identifies the TokenForeground dependency property.

Properties

ClipboardCopyFormat

Gets or sets a value that specifies whether text is copied with all formats, or as plain text only.

ClipboardPasteFormat

Gets or sets a value that specifies whether pasted text preserves all formats, or as plain text only.

Description

Gets or sets content that is shown below the control. The content should provide guidance about the input expected by the control.

DisabledFormattingAccelerators

Gets or sets a value that indicates which keyboard shortcuts for formatting are disabled.

Header

Gets or sets the content for the control's header.

HeaderTemplate

Gets or sets the Windows.UI.Xaml.DataTemplate used to display the content of the control's header.

HorizontalOffset

Gets the distance the content has been scrolled horizontally from the underlying Windows.UI.Xaml.Controls.ScrollViewer.

PlaceholderText

Gets or sets the text that is displayed in the control until the value is changed by a user action or some other operation.

PopupCornerRadius

Gets or sets the radius for the corners of the popup control's border.

PopupFooter

Gets or sets the content for the suggestion popup control's footer.

PopupFooterTemplate

Gets or sets the Windows.UI.Xaml.DataTemplate used to display the content of the suggestion popup control's footer.

PopupHeader

Gets or sets the content for the suggestion popup control's header.

PopupHeaderTemplate

Gets or sets the Windows.UI.Xaml.DataTemplate used to display the content of the suggestion popup control's header.

PopupPlacement

Gets or sets suggestion popup placement to either Floating or Attached to the text box.

Prefixes

Gets or sets prefix characters to start a query.

RichEditBoxStyle

Gets or sets the style of the underlying Windows.UI.Xaml.Controls.RichEditBox.

TextDocument

Gets an object that enables access to the text object model for the text contained in a Windows.UI.Xaml.Controls.RichEditBox.

TokenBackground

Gets or sets the default brush used to color the suggestion token background.

TokenForeground

Gets or sets the default brush used to color the suggestion token foreground.

Tokens

Gets a collection of suggestion tokens that are present in the document.

VerticalOffset

Gets the distance the content has been scrolled vertically from the underlying Windows.UI.Xaml.Controls.ScrollViewer.

Methods

AddTokens(IEnumerable<RichSuggestToken>)

Add tokens to be tracked against the document. Duplicate tokens will not be updated.

Clear()

Clear the document and token list. This will also clear the undo/redo history.

ClearUndoRedoSuggestionHistory()

Clear unused tokens and undo/redo history.

GetRectFromRange(ITextRange)

Retrieves the bounding rectangle that encompasses the text range with position measured from the top left of the RichSuggestBox control.

Load(String, IEnumerable<RichSuggestToken>)

Populate the RichSuggestBox with an existing Rich Text Format (RTF) document and a collection of tokens.

OnApplyTemplate() Windows.UI.Xaml.Controls.ItemsControl.OnApplyTemplate
TryGetTokenFromRange(ITextRange, RichSuggestToken)

Try getting the token associated with a text range.

Events

Paste

Event raised when text is pasted into the control.

SelectionChanged

Event raised when the text selection has changed.

SuggestionChosen

Event raised when user click on a suggestion. This event lets you customize the token appearance in the document.

SuggestionRequested

Event raised when the control needs to show suggestions.

TextChanged

Event raised when text is changed, either by user or by internal formatting.

TokenPointerOver

Event raised when a pointer is hovering over a token.

TokenSelected

Event raised when a token is fully highlighted.

Applies to