New to Telerik UI for WPFStart a free 30-day trial

Provides an implementation of IInlineAssistantInteractionProvider for a TextBox.

Definition

Namespace:Telerik.Windows.Controls.ConversationalUI

Assembly:Telerik.Windows.Controls.ConversationalUI.dll

Syntax:

C#
public class InlineAIAssistantTextBoxProvider : IInlineAssistantInteractionProvider

Inheritance: objectInlineAIAssistantTextBoxProvider

Implements: IInlineAssistantInteractionProvider

Constructors

Initializes a new instance of the InlineAIAssistantTextBoxProvider class.

C#
public InlineAIAssistantTextBoxProvider(TextBox textBox)
Parameters:textBoxTextBox

Properties

Gets the full text of the TextBox.

C#
public virtual string FullText { get; }

Implements: IInlineAssistantInteractionProvider.FullText

Gets the currently selected text in the TextBox.

C#
public virtual string SelectedText { get; }

Implements: IInlineAssistantInteractionProvider.SelectedText

TargetElement

FrameworkElement

Gets the target FrameworkElement that the inline assistant interacts with.

C#
public FrameworkElement TargetElement { get; }

Implements: IInlineAssistantInteractionProvider.TargetElement

Methods

Determines whether text can be inserted at the current caret position in the TextBox.

C#
public virtual bool CanInsertText(string text)
Parameters:textstring

The text to insert.

Returns:

bool

true if text can be inserted; otherwise, false.

Implements: IInlineAssistantInteractionProvider.CanInsertText(string)

Determines whether the selected text in the TextBox can be replaced.

C#
public virtual bool CanReplaceSelectedText(string text)
Parameters:textstring

The text to replace with.

Returns:

bool

true if the selected text can be replaced; otherwise, false.

Implements: IInlineAssistantInteractionProvider.CanReplaceSelectedText(string)

Gets the screen position of the caret or the end of the selection in the TextBox.

C#
public virtual Point? GetPosition()
Returns:

Point?

The screen position, or null if the caret or selection is outside the visible viewport of the TextBox.

Implements: IInlineAssistantInteractionProvider.GetPosition()

Inserts the specified text at the current caret position in the TextBox.

C#
public virtual void InsertText(string text)
Parameters:textstring

The text to insert.

Implements: IInlineAssistantInteractionProvider.InsertText(string)

Replaces the currently selected text in the TextBox.

C#
public virtual void ReplaceSelectedText(string text)
Parameters:textstring

The text to replace with.

Implements: IInlineAssistantInteractionProvider.ReplaceSelectedText(string)