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

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:

C#
public class RadPromptInput : Control

Inheritance: objectRadPromptInput

Constructors

Initializes a new instance of the RadPromptInput class.

C#
public RadPromptInput()

Fields

AcceptsReturnProperty

DependencyProperty

Identifies the AcceptsReturn dependency property.

C#
public static readonly DependencyProperty AcceptsReturnProperty

AttachedFilesProperty

DependencyProperty

Identifies the AttachedFiles dependency property.

C#
public static readonly DependencyProperty AttachedFilesProperty

AttachmentTemplateProperty

DependencyProperty

Identifies the AttachmentTemplate dependency property.

C#
public static readonly DependencyProperty AttachmentTemplateProperty

Identifies the AttachmentTemplateSelector dependency property.

C#
public static readonly DependencyProperty AttachmentTemplateSelectorProperty

Identifies the CancelProcessingCommand dependency property.

C#
public static readonly DependencyProperty CancelProcessingCommandProperty

Identifies the CancelProcessing routed event.

C#
public static readonly RoutedEvent CancelProcessingEvent

Identifies the DialogOpening routed event.

C#
public static readonly RoutedEvent DialogOpeningEvent

Identifies the FileIconGlyphConverter dependency property.

C#
public static readonly DependencyProperty FileIconGlyphConverterProperty

Identifies the HasPromptSuggestions dependency property.

C#
public static readonly DependencyProperty HasPromptSuggestionsProperty

HasRecentPromptsProperty

DependencyProperty

Identifies the HasRecentPrompts dependency property.

C#
public static readonly DependencyProperty HasRecentPromptsProperty

HasSuggestedPromptsProperty

DependencyProperty

Identifies the HasSuggestedPrompts dependency property.

C#
public static readonly DependencyProperty HasSuggestedPromptsProperty

IsMoreButtonVisibleProperty

DependencyProperty

Identifies the IsMoreButtonVisible dependency property.

C#
public static readonly DependencyProperty IsMoreButtonVisibleProperty

IsProcessingProperty

DependencyProperty

Identifies the IsProcessing dependency property.

C#
public static readonly DependencyProperty IsProcessingProperty

Identifies the IsPromptSuggestionsButtonVisible dependency property.

C#
public static readonly DependencyProperty IsPromptSuggestionsButtonVisibleProperty

Identifies the IsRecentPromptsVisible dependency property.

C#
public static readonly DependencyProperty IsRecentPromptsVisibleProperty

Identifies the IsSpeechToTextButtonVisible dependency property.

C#
public static readonly DependencyProperty IsSpeechToTextButtonVisibleProperty

Identifies the IsSuggestedPromptsVisible dependency property.

C#
public static readonly DependencyProperty IsSuggestedPromptsVisibleProperty

MaxInputLinesProperty

DependencyProperty

Identifies the MaxInputLines dependency property.

C#
public static readonly DependencyProperty MaxInputLinesProperty

Identifies the MoreButtonActionsItemTemplate dependency property.

C#
public static readonly DependencyProperty MoreButtonActionsItemTemplateProperty

Identifies the MoreButtonActionsItemTemplateSelector dependency property.

C#
public static readonly DependencyProperty MoreButtonActionsItemTemplateSelectorProperty

MoreButtonActionsProperty

DependencyProperty

Identifies the MoreButtonActions dependency property.

C#
public static readonly DependencyProperty MoreButtonActionsProperty

Identifies the OpenPromptSuggestionsOnFocus dependency property.

C#
public static readonly DependencyProperty OpenPromptSuggestionsOnFocusProperty

Identifies the PromptSuggestionSelected routed event.

C#
public static readonly RoutedEvent PromptSuggestionSelectedEvent

Identifies the PromptSuggestionsEmptyContent dependency property.

C#
public static readonly DependencyProperty PromptSuggestionsEmptyContentProperty

Identifies the PromptSuggestionsEmptyContentTemplate dependency property.

C#
public static readonly DependencyProperty PromptSuggestionsEmptyContentTemplateProperty

RecentPromptsProperty

DependencyProperty

Identifies the RecentPrompts dependency property.

C#
public static readonly DependencyProperty RecentPromptsProperty

Identifies the RemoveAttachedFileCommand dependency property.

C#
public static readonly DependencyProperty RemoveAttachedFileCommandProperty

SendButtonContentProperty

DependencyProperty

Identifies the SendButtonContent dependency property.

C#
public static readonly DependencyProperty SendButtonContentProperty

Identifies the SendButtonContentTemplate dependency property.

C#
public static readonly DependencyProperty SendButtonContentTemplateProperty

SendMessageCommandProperty

DependencyProperty

Identifies the SendMessageCommand dependency property.

C#
public static readonly DependencyProperty SendMessageCommandProperty

SendMessageEvent

RoutedEvent

Identifies the SendMessage routed event.

C#
public static readonly RoutedEvent SendMessageEvent

ShowClearButtonProperty

DependencyProperty

Identifies the ShowClearButton dependency property.

C#
public static readonly DependencyProperty ShowClearButtonProperty

SuggestedPromptsProperty

DependencyProperty

Identifies the SuggestedPrompts dependency property.

C#
public static readonly DependencyProperty SuggestedPromptsProperty

TextProperty

DependencyProperty

Identifies the Text dependency property.

C#
public static readonly DependencyProperty TextProperty

WatermarkContentProperty

DependencyProperty

Identifies the WatermarkContent dependency property.

C#
public static readonly DependencyProperty WatermarkContentProperty

Properties

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.

C#
public bool AcceptsReturn { get; set; }

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

C#
public ObservableCollection<PromptInputAttachedFile> AttachedFiles { get; }

AttachmentTemplate

DataTemplate

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

C#
public DataTemplate AttachmentTemplate { get; set; }

AttachmentTemplateSelector

DataTemplateSelector

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

C#
public DataTemplateSelector AttachmentTemplateSelector { get; set; }

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

C#
public ICommand CancelProcessingCommand { get; set; }

FileIconGlyphConverter

IValueConverter

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.

C#
public IValueConverter FileIconGlyphConverter { get; set; }

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

C#
public bool HasPromptSuggestions { get; }

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

C#
public bool HasRecentPrompts { get; }

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

C#
public bool HasSuggestedPrompts { get; }

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

C#
public bool IsMoreButtonVisible { get; set; }

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.

C#
public bool IsProcessing { get; set; }

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

C#
public bool IsPromptSuggestionsButtonVisible { get; set; }

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

C#
public bool IsRecentPromptsVisible { get; set; }

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

C#
public bool IsSpeechToTextButtonVisible { get; set; }

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

C#
public bool IsSuggestedPromptsVisible { get; set; }

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.

C#
public int MaxInputLines { get; set; }

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

C#
public ObservableCollection<PromptInputButtonAction> MoreButtonActions { get; set; }

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

C#
public DataTemplate MoreButtonActionsItemTemplate { get; set; }

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

C#
public DataTemplateSelector MoreButtonActionsItemTemplateSelector { get; set; }

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

C#
public bool OpenPromptSuggestionsOnFocus { get; set; }

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

C#
public object PromptSuggestionsEmptyContent { get; set; }

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.

C#
public DataTemplate PromptSuggestionsEmptyContentTemplate { get; set; }

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

C#
public ObservableCollection<string> RecentPrompts { get; set; }

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

C#
public ICommand RemoveAttachedFileCommand { get; set; }

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

C#
public object SendButtonContent { get; set; }

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

C#
public DataTemplate SendButtonContentTemplate { get; set; }

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

C#
public ICommand SendMessageCommand { get; set; }

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.

C#
public bool ShowClearButton { get; set; }

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

C#
public ObservableCollection<string> SuggestedPrompts { get; set; }

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.

C#
public string Text { get; set; }

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

C#
public object WatermarkContent { get; set; }

Methods

C#
public override void OnApplyTemplate()

Raises the CancelProcessing routed event.

C#
protected virtual void OnCancelProcessing(RoutedEventArgs args)
Parameters:argsRoutedEventArgs

The event data.

Raises the DialogOpening routed event.

C#
protected virtual void OnDialogOpening(PromptInputDialogOpeningEventArgs args)
Parameters:argsPromptInputDialogOpeningEventArgs

The event data.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

Raises the PromptSuggestionSelected routed event.

C#
protected virtual void OnPromptSuggestionSelected(PromptInputSuggestionSelectedEventArgs args)
Parameters:argsPromptInputSuggestionSelectedEventArgs

The event data.

Raises the SendMessage routed event.

C#
protected virtual void OnSendMessage(PromptInputSendMessageEventArgs args)
Parameters:argsPromptInputSendMessageEventArgs

The event data.

Events

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

C#
public event EventHandler<RoutedEventArgs> CancelProcessing

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.

C#
public event EventHandler<PromptInputDialogOpeningEventArgs> DialogOpening

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

C#
public event EventHandler<PromptInputSuggestionSelectedEventArgs> PromptSuggestionSelected

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.

C#
public event EventHandler<PromptInputSendMessageEventArgs> SendMessage
In this article
DefinitionConstructorsRadPromptInput()FieldsAcceptsReturnPropertyAttachedFilesPropertyAttachmentTemplatePropertyAttachmentTemplateSelectorPropertyCancelProcessingCommandPropertyCancelProcessingEventDialogOpeningEventFileIconGlyphConverterPropertyHasPromptSuggestionsPropertyHasRecentPromptsPropertyHasSuggestedPromptsPropertyIsMoreButtonVisiblePropertyIsProcessingPropertyIsPromptSuggestionsButtonVisiblePropertyIsRecentPromptsVisiblePropertyIsSpeechToTextButtonVisiblePropertyIsSuggestedPromptsVisiblePropertyMaxInputLinesPropertyMoreButtonActionsItemTemplatePropertyMoreButtonActionsItemTemplateSelectorPropertyMoreButtonActionsPropertyOpenPromptSuggestionsOnFocusPropertyPromptSuggestionSelectedEventPromptSuggestionsEmptyContentPropertyPromptSuggestionsEmptyContentTemplatePropertyRecentPromptsPropertyRemoveAttachedFileCommandPropertySendButtonContentPropertySendButtonContentTemplatePropertySendMessageCommandPropertySendMessageEventShowClearButtonPropertySuggestedPromptsPropertyTextPropertyWatermarkContentPropertyPropertiesAcceptsReturnAttachedFilesAttachmentTemplateAttachmentTemplateSelectorCancelProcessingCommandFileIconGlyphConverterHasPromptSuggestionsHasRecentPromptsHasSuggestedPromptsIsMoreButtonVisibleIsProcessingIsPromptSuggestionsButtonVisibleIsRecentPromptsVisibleIsSpeechToTextButtonVisibleIsSuggestedPromptsVisibleMaxInputLinesMoreButtonActionsMoreButtonActionsItemTemplateMoreButtonActionsItemTemplateSelectorOpenPromptSuggestionsOnFocusPromptSuggestionsEmptyContentPromptSuggestionsEmptyContentTemplateRecentPromptsRemoveAttachedFileCommandSendButtonContentSendButtonContentTemplateSendMessageCommandShowClearButtonSuggestedPromptsTextWatermarkContentMethodsOnApplyTemplate()OnCancelProcessing(RoutedEventArgs)OnDialogOpening(PromptInputDialogOpeningEventArgs)OnInitialized(EventArgs)OnPromptSuggestionSelected(PromptInputSuggestionSelectedEventArgs)OnSendMessage(PromptInputSendMessageEventArgs)EventsCancelProcessingDialogOpeningPromptSuggestionSelectedSendMessage
Not finding the help you need?
Contact Support