Class
RadPromptInput

Represents a smart input control for composing and sending messages with support for attachments, speech-to-text, popup actions. Designed to be used within a RadChat or as a standalone input component.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public class RadPromptInput : Control

Inheritance: objectRadPromptInput

Constructors

RadPromptInput()

Initializes a new instance of the RadPromptInput class.

Declaration

cs-api-definition
public RadPromptInput()

Fields

AcceptsReturnProperty

Identifies the AcceptsReturn dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AcceptsReturnProperty

Field Value

DependencyProperty

AttachedFilesProperty

Identifies the AttachedFiles dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AttachedFilesProperty

Field Value

DependencyProperty

AttachmentTemplateProperty

Identifies the AttachmentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AttachmentTemplateProperty

Field Value

DependencyProperty

AttachmentTemplateSelectorProperty

Identifies the AttachmentTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AttachmentTemplateSelectorProperty

Field Value

DependencyProperty

CancelProcessingCommandProperty

Identifies the CancelProcessingCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CancelProcessingCommandProperty

Field Value

DependencyProperty

CancelProcessingEvent

Identifies the CancelProcessing routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent CancelProcessingEvent

Field Value

RoutedEvent

DialogOpeningEvent

Identifies the DialogOpening routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent DialogOpeningEvent

Field Value

RoutedEvent

FileIconGlyphConverterProperty

Identifies the FileIconGlyphConverter dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty FileIconGlyphConverterProperty

Field Value

DependencyProperty

HasPromptSuggestionsProperty

Identifies the HasPromptSuggestions dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasPromptSuggestionsProperty

Field Value

DependencyProperty

HasRecentPromptsProperty

Identifies the HasRecentPrompts dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasRecentPromptsProperty

Field Value

DependencyProperty

HasSuggestedPromptsProperty

Identifies the HasSuggestedPrompts dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasSuggestedPromptsProperty

Field Value

DependencyProperty

IsMoreButtonVisibleProperty

Identifies the IsMoreButtonVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsMoreButtonVisibleProperty

Field Value

DependencyProperty

IsProcessingProperty

Identifies the IsProcessing dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsProcessingProperty

Field Value

DependencyProperty

IsPromptSuggestionsButtonVisibleProperty

Identifies the IsPromptSuggestionsButtonVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsPromptSuggestionsButtonVisibleProperty

Field Value

DependencyProperty

IsRecentPromptsVisibleProperty

Identifies the IsRecentPromptsVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsRecentPromptsVisibleProperty

Field Value

DependencyProperty

IsSpeechToTextButtonVisibleProperty

Identifies the IsSpeechToTextButtonVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSpeechToTextButtonVisibleProperty

Field Value

DependencyProperty

IsSuggestedPromptsVisibleProperty

Identifies the IsSuggestedPromptsVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSuggestedPromptsVisibleProperty

Field Value

DependencyProperty

MaxInputLinesProperty

Identifies the MaxInputLines dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MaxInputLinesProperty

Field Value

DependencyProperty

MoreButtonActionsItemTemplateProperty

Identifies the MoreButtonActionsItemTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoreButtonActionsItemTemplateProperty

Field Value

DependencyProperty

MoreButtonActionsItemTemplateSelectorProperty

Identifies the MoreButtonActionsItemTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoreButtonActionsItemTemplateSelectorProperty

Field Value

DependencyProperty

MoreButtonActionsProperty

Identifies the MoreButtonActions dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoreButtonActionsProperty

Field Value

DependencyProperty

OpenPromptSuggestionsOnFocusProperty

Identifies the OpenPromptSuggestionsOnFocus dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OpenPromptSuggestionsOnFocusProperty

Field Value

DependencyProperty

PromptSuggestionSelectedEvent

Identifies the PromptSuggestionSelected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PromptSuggestionSelectedEvent

Field Value

RoutedEvent

PromptSuggestionsEmptyContentProperty

Identifies the PromptSuggestionsEmptyContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PromptSuggestionsEmptyContentProperty

Field Value

DependencyProperty

PromptSuggestionsEmptyContentTemplateProperty

Identifies the PromptSuggestionsEmptyContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PromptSuggestionsEmptyContentTemplateProperty

Field Value

DependencyProperty

RecentPromptsProperty

Identifies the RecentPrompts dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RecentPromptsProperty

Field Value

DependencyProperty

RemoveAttachedFileCommandProperty

Identifies the RemoveAttachedFileCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RemoveAttachedFileCommandProperty

Field Value

DependencyProperty

SendButtonContentProperty

Identifies the SendButtonContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SendButtonContentProperty

Field Value

DependencyProperty

SendButtonContentTemplateProperty

Identifies the SendButtonContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SendButtonContentTemplateProperty

Field Value

DependencyProperty

SendMessageCommandProperty

Identifies the SendMessageCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SendMessageCommandProperty

Field Value

DependencyProperty

SendMessageEvent

Identifies the SendMessage routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SendMessageEvent

Field Value

RoutedEvent

ShowClearButtonProperty

Identifies the ShowClearButton dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShowClearButtonProperty

Field Value

DependencyProperty

SuggestedPromptsProperty

Identifies the SuggestedPrompts dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestedPromptsProperty

Field Value

DependencyProperty

TextProperty

Identifies the Text dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TextProperty

Field Value

DependencyProperty

WatermarkContentProperty

Identifies the WatermarkContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty WatermarkContentProperty

Field Value

DependencyProperty

Properties

AcceptsReturn

Gets or sets a value indicating whether the input box accepts the Return key to create new lines. When false, pressing Enter triggers the SendMessageCommand.

Declaration

cs-api-definition
public bool AcceptsReturn { get; set; }

Property Value

bool

AttachedFiles

Gets the collection of attached items displayed above the input area. Items are rendered using AttachmentTemplate or AttachmentTemplateSelector.

Declaration

cs-api-definition
public ObservableCollection<PromptInputAttachedFile> AttachedFiles { get; }

Property Value

ObservableCollection<PromptInputAttachedFile>

AttachmentTemplate

Gets or sets the data template used to display each attachment item.

Declaration

cs-api-definition
public DataTemplate AttachmentTemplate { get; set; }

Property Value

DataTemplate

AttachmentTemplateSelector

Gets or sets the data template selector used to choose the template for each attachment item.

Declaration

cs-api-definition
public DataTemplateSelector AttachmentTemplateSelector { get; set; }

Property Value

DataTemplateSelector

CancelProcessingCommand

Gets or sets the command that is executed to cancel an ongoing operation when the user clicks the send button while IsProcessing is true.

Declaration

cs-api-definition
public ICommand CancelProcessingCommand { get; set; }

Property Value

ICommand

FileIconGlyphConverter

Gets or sets the IValueConverter used to convert a file name to a glyph character for display in the attachment area. The converter receives the FileName and should return a single glyph character string. The default value is set to a FileExtensionToGlyphConverter instance via the default style.

Declaration

cs-api-definition
public IValueConverter FileIconGlyphConverter { get; set; }

Property Value

IValueConverter

HasPromptSuggestions

Gets a value indicating whether there are any suggested or recent prompts available.

Declaration

cs-api-definition
public bool HasPromptSuggestions { get; }

Property Value

bool

HasRecentPrompts

Gets a value indicating whether the RecentPrompts collection contains any items.

Declaration

cs-api-definition
public bool HasRecentPrompts { get; }

Property Value

bool

HasSuggestedPrompts

Gets a value indicating whether the SuggestedPrompts collection contains any items.

Declaration

cs-api-definition
public bool HasSuggestedPrompts { get; }

Property Value

bool

IsMoreButtonVisible

Gets or sets a value indicating whether the more button is visible.

Declaration

cs-api-definition
public bool IsMoreButtonVisible { get; set; }

Property Value

bool

IsProcessing

Gets or sets a value indicating whether the control is in a processing state (e.g., waiting for an AI response). When true, the send button switches to a stop icon and executes CancelProcessingCommand instead of SendMessageCommand.

Declaration

cs-api-definition
public bool IsProcessing { get; set; }

Property Value

bool

IsPromptSuggestionsButtonVisible

Gets or sets a value indicating whether the prompt suggestions button is visible.

Declaration

cs-api-definition
public bool IsPromptSuggestionsButtonVisible { get; set; }

Property Value

bool

IsRecentPromptsVisible

Gets or sets a value indicating whether the recent prompts section is visible in the suggestions popup.

Declaration

cs-api-definition
public bool IsRecentPromptsVisible { get; set; }

Property Value

bool

IsSpeechToTextButtonVisible

Gets or sets a value indicating whether the speech-to-text button is visible.

Declaration

cs-api-definition
public bool IsSpeechToTextButtonVisible { get; set; }

Property Value

bool

IsSuggestedPromptsVisible

Gets or sets a value indicating whether the suggested prompts section is visible in the suggestions popup.

Declaration

cs-api-definition
public bool IsSuggestedPromptsVisible { get; set; }

Property Value

bool

MaxInputLines

Gets or sets the maximum number of visible lines in the input text box. The default value is 5. The text box will scroll vertically when content exceeds this limit.

Declaration

cs-api-definition
public int MaxInputLines { get; set; }

Property Value

int

MoreButtonActions

Gets or sets the collection of action items displayed in the more button popup.

Declaration

cs-api-definition
public ObservableCollection<PromptInputButtonAction> MoreButtonActions { get; set; }

Property Value

ObservableCollection<PromptInputButtonAction>

MoreButtonActionsItemTemplate

Gets or sets the data template used to display each action item in the more button dropdown.

Declaration

cs-api-definition
public DataTemplate MoreButtonActionsItemTemplate { get; set; }

Property Value

DataTemplate

MoreButtonActionsItemTemplateSelector

Gets or sets the data template selector used to choose a template for each action item in the more button dropdown.

Declaration

cs-api-definition
public DataTemplateSelector MoreButtonActionsItemTemplateSelector { get; set; }

Property Value

DataTemplateSelector

OpenPromptSuggestionsOnFocus

Gets or sets a value indicating whether the suggestions popup opens when the input receives focus.

Declaration

cs-api-definition
public bool OpenPromptSuggestionsOnFocus { get; set; }

Property Value

bool

PromptSuggestionsEmptyContent

Gets or sets the content displayed in the prompt suggestions dropdown when there are no suggested or recent prompts available.

Declaration

cs-api-definition
public object PromptSuggestionsEmptyContent { get; set; }

Property Value

object

PromptSuggestionsEmptyContentTemplate

Gets or sets the data template used to display the empty state content in the prompt suggestions dropdown when there are no suggested or recent prompts available.

Declaration

cs-api-definition
public DataTemplate PromptSuggestionsEmptyContentTemplate { get; set; }

Property Value

DataTemplate

RecentPrompts

Gets or sets the collection of recent prompts displayed in the suggestions popup.

Declaration

cs-api-definition
public ObservableCollection<string> RecentPrompts { get; set; }

Property Value

ObservableCollection<string>

RemoveAttachedFileCommand

Gets or sets the command that is executed to remove an attached file. The command parameter is the attached file item to remove.

Declaration

cs-api-definition
public ICommand RemoveAttachedFileCommand { get; set; }

Property Value

ICommand

SendButtonContent

Gets or sets the content to display inside the send button. When set, this replaces the default send/stop glyph icons.

Declaration

cs-api-definition
public object SendButtonContent { get; set; }

Property Value

object

SendButtonContentTemplate

Gets or sets the data template used to display the SendButtonContent.

Declaration

cs-api-definition
public DataTemplate SendButtonContentTemplate { get; set; }

Property Value

DataTemplate

SendMessageCommand

Gets or sets the command that is executed when the send button is clicked or Enter is pressed.

Declaration

cs-api-definition
public ICommand SendMessageCommand { get; set; }

Property Value

ICommand

ShowClearButton

Gets or sets a value indicating whether the clear button is visible. When true, a clear (X) button appears next to the input box whenever Text is not empty.

Declaration

cs-api-definition
public bool ShowClearButton { get; set; }

Property Value

bool

SuggestedPrompts

Gets or sets the collection of suggested prompts displayed in the suggestions popup.

Declaration

cs-api-definition
public ObservableCollection<string> SuggestedPrompts { get; set; }

Property Value

ObservableCollection<string>

Text

Gets or sets the text content of the input box. This property binds two-way to the inner text box and updates on every keystroke.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

WatermarkContent

Gets or sets the watermark (placeholder) content displayed when the input box is empty.

Declaration

cs-api-definition
public object WatermarkContent { get; set; }

Property Value

object

Methods

OnApplyTemplate()

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCancelProcessing(RoutedEventArgs)

Raises the CancelProcessing routed event.

Declaration

cs-api-definition
protected virtual void OnCancelProcessing(RoutedEventArgs args)

Parameters

args

RoutedEventArgs

The event data.

OnDialogOpening(PromptInputDialogOpeningEventArgs)

Raises the DialogOpening routed event.

Declaration

cs-api-definition
protected virtual void OnDialogOpening(PromptInputDialogOpeningEventArgs args)

Parameters

args

PromptInputDialogOpeningEventArgs

The event data.

OnInitialized(EventArgs)

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

OnPromptSuggestionSelected(PromptInputSuggestionSelectedEventArgs)

Raises the PromptSuggestionSelected routed event.

Declaration

cs-api-definition
protected virtual void OnPromptSuggestionSelected(PromptInputSuggestionSelectedEventArgs args)

Parameters

args

PromptInputSuggestionSelectedEventArgs

The event data.

OnSendMessage(PromptInputSendMessageEventArgs)

Raises the SendMessage routed event.

Declaration

cs-api-definition
protected virtual void OnSendMessage(PromptInputSendMessageEventArgs args)

Parameters

args

PromptInputSendMessageEventArgs

The event data.

Events

CancelProcessing

Occurs when the user clicks the send button while the control is in a processing state, requesting cancellation of the current operation.

Declaration

cs-api-definition
public event EventHandler<RoutedEventArgs> CancelProcessing

Event Value

EventHandler<RoutedEventArgs>

DialogOpening

Occurs when a file dialog is about to open. Set Cancel to true to suppress the default dialog and handle file selection externally (e.g., using RadOpenFileDialog). When canceled, populate FileNames with the selected paths.

Declaration

cs-api-definition
public event EventHandler<PromptInputDialogOpeningEventArgs> DialogOpening

Event Value

EventHandler<PromptInputDialogOpeningEventArgs>

PromptSuggestionSelected

Occurs when the user selects a suggestion from the prompt suggestions dropdown.

Declaration

cs-api-definition
public event EventHandler<PromptInputSuggestionSelectedEventArgs> PromptSuggestionSelected

Event Value

EventHandler<PromptInputSuggestionSelectedEventArgs>

SendMessage

Occurs when the user sends a message via the send button or the Enter key. The event args contain a snapshot of the input text and attached files.

Declaration

cs-api-definition
public event EventHandler<PromptInputSendMessageEventArgs> SendMessage

Event Value

EventHandler<PromptInputSendMessageEventArgs>

In this article
DefinitionConstructorsRadPromptInput()FieldsAcceptsReturnPropertyAttachedFilesPropertyAttachmentTemplatePropertyAttachmentTemplateSelectorPropertyCancelProcessingCommandPropertyCancelProcessingEventDialogOpeningEventFileIconGlyphConverterPropertyHasPromptSuggestionsPropertyHasRecentPromptsPropertyHasSuggestedPromptsPropertyIsMoreButtonVisiblePropertyIsProcessingPropertyIsPromptSuggestionsButtonVisiblePropertyIsRecentPromptsVisiblePropertyIsSpeechToTextButtonVisiblePropertyIsSuggestedPromptsVisiblePropertyMaxInputLinesPropertyMoreButtonActionsItemTemplatePropertyMoreButtonActionsItemTemplateSelectorPropertyMoreButtonActionsPropertyOpenPromptSuggestionsOnFocusPropertyPromptSuggestionSelectedEventPromptSuggestionsEmptyContentPropertyPromptSuggestionsEmptyContentTemplatePropertyRecentPromptsPropertyRemoveAttachedFileCommandPropertySendButtonContentPropertySendButtonContentTemplatePropertySendMessageCommandPropertySendMessageEventShowClearButtonPropertySuggestedPromptsPropertyTextPropertyWatermarkContentPropertyPropertiesAcceptsReturnAttachedFilesAttachmentTemplateAttachmentTemplateSelectorCancelProcessingCommandFileIconGlyphConverterHasPromptSuggestionsHasRecentPromptsHasSuggestedPromptsIsMoreButtonVisibleIsProcessingIsPromptSuggestionsButtonVisibleIsRecentPromptsVisibleIsSpeechToTextButtonVisibleIsSuggestedPromptsVisibleMaxInputLinesMoreButtonActionsMoreButtonActionsItemTemplateMoreButtonActionsItemTemplateSelectorOpenPromptSuggestionsOnFocusPromptSuggestionsEmptyContentPromptSuggestionsEmptyContentTemplateRecentPromptsRemoveAttachedFileCommandSendButtonContentSendButtonContentTemplateSendMessageCommandShowClearButtonSuggestedPromptsTextWatermarkContentMethodsOnApplyTemplate()OnCancelProcessing(RoutedEventArgs)OnDialogOpening(PromptInputDialogOpeningEventArgs)OnInitialized(EventArgs)OnPromptSuggestionSelected(PromptInputSuggestionSelectedEventArgs)OnSendMessage(PromptInputSendMessageEventArgs)EventsCancelProcessingDialogOpeningPromptSuggestionSelectedSendMessage
Not finding the help you need?
Contact Support