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

A component that bridges the gap between an app and the next-generation AI language model applications. Use the AIPrompt to provide your users with pre-determined ways to interact with a trained language model of your choice.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ConversationalUI.dll

Syntax:

C#
[TelerikToolboxCategory("ConversationalUI")]
public class RadAIPrompt : ItemsControl

Inheritance: objectRadAIPrompt

Constructors

Initializes a new instance of the RadAIPrompt class.

C#
public RadAIPrompt()

Fields

ActiveItemProperty

DependencyProperty

Identifies the ActiveItem dependency property.

C#
public static readonly DependencyProperty ActiveItemProperty

Identifies the AreSuggestionsVisible property.

C#
public static readonly DependencyProperty AreSuggestionsVisibleProperty

CommandsProperty

DependencyProperty

Identifies the Commands property.

C#
public static readonly DependencyProperty CommandsProperty

CurrentPageIndexProperty

DependencyProperty

Identifies the CurrentPageIndex property.

C#
public static readonly DependencyProperty CurrentPageIndexProperty

HeaderBackgroundProperty

DependencyProperty

Identifies the HeaderBackground property.

C#
public static readonly DependencyProperty HeaderBackgroundProperty

HeaderMinHeightProperty

DependencyProperty

Identifies the HeaderMinHeight property.

C#
public static readonly DependencyProperty HeaderMinHeightProperty

InputButtonContentProperty

DependencyProperty

Identifies the InputButtonContent property.

C#
public static readonly DependencyProperty InputButtonContentProperty

Identifies the InputButtonContentTemplate property.

C#
public static readonly DependencyProperty InputButtonContentTemplateProperty

InputTextBoxStyleProperty

DependencyProperty

Identifies the InputTextBoxStyle property.

C#
public static readonly DependencyProperty InputTextBoxStyleProperty

InputTextProperty

DependencyProperty

Identifies the InputText property.

C#
public static readonly DependencyProperty InputTextProperty

IsPagingEnabledProperty

DependencyProperty

Identifies the IsPagingEnabled property.

C#
public static readonly DependencyProperty IsPagingEnabledProperty

Identifies the MoveToFirstPageCommand dependency property.

C#
public static readonly DependencyProperty MoveToFirstPageCommandProperty

Identifies the MoveToLastPageCommand dependency property.

C#
public static readonly DependencyProperty MoveToLastPageCommandProperty

Identifies the MoveToNextPageCommand dependency property.

C#
public static readonly DependencyProperty MoveToNextPageCommandProperty

Identifies the MoveToPreviousPageCommand dependency property.

C#
public static readonly DependencyProperty MoveToPreviousPageCommandProperty

Identifies the OutputItemCopyCommand property.

C#
public static readonly DependencyProperty OutputItemCopyCommandProperty

Identifies the OutputItemRatingChangedCommand property.

C#
public static readonly DependencyProperty OutputItemRatingChangedCommandProperty

Identifies the OutputItemRetryCommand property.

C#
public static readonly DependencyProperty OutputItemRetryCommandProperty

OutputItemsProperty

DependencyProperty

Identifies the OutputItems property.

C#
public static readonly DependencyProperty OutputItemsProperty

PageCountProperty

DependencyProperty

Identifies the PageCount dependency property.

C#
public static readonly DependencyProperty PageCountProperty

PagedOutputItemsProperty

DependencyProperty

Identifies the PagedOutputItems dependency property.

C#
public static readonly DependencyProperty PagedOutputItemsProperty

PageSizeProperty

DependencyProperty

Identifies the PageSize property.

C#
public static readonly DependencyProperty PageSizeProperty

Identifies the PromptRequestCommand property.

C#
public static readonly DependencyProperty PromptRequestCommandProperty

Identifies the event.

C#
public static readonly RoutedEvent PromptRequestEvent

Identifies the SuggestionClickedCommand property.

C#
public static readonly DependencyProperty SuggestionClickedCommandProperty

Identifies the SuggestionItemTemplate property.

C#
public static readonly DependencyProperty SuggestionItemTemplateProperty

Identifies the SuggestionsExpanderStyle property.

C#
public static readonly DependencyProperty SuggestionsExpanderStyleProperty

Identifies the SuggestionsHeaderContent property.

C#
public static readonly DependencyProperty SuggestionsHeaderContentProperty

Identifies the SuggestionsHeaderContentTemplate property.

C#
public static readonly DependencyProperty SuggestionsHeaderContentTemplateProperty

SuggestionsProperty

DependencyProperty

Identifies the Suggestions property.

C#
public static readonly DependencyProperty SuggestionsProperty

Properties

Gets the currently active item.

C#
public RadAIPromptItem ActiveItem { get; }

Gets or sets a boolean value indicating whether the RadExpander that displays the input suggestions is visible.

C#
public bool AreSuggestionsVisible { get; set; }

Gets or sets the AIPrompt commands.

C#
public IList<AIPromptCommandBase> Commands { get; set; }

Gets of sets the index of the current page (starting from 1) in the output view.

C#
public int CurrentPageIndex { get; set; }

Gets or sets the header background.

C#
public Brush HeaderBackground { get; set; }

Gets or sets the header min height.

C#
public double HeaderMinHeight { get; set; }

Gets or sets the Content of the input button.

C#
public object InputButtonContent { get; set; }

Gets or sets the DataTemplate applied to the property of the input button.

C#
public DataTemplate InputButtonContentTemplate { get; set; }

Gets or sets the input text.

C#
public string InputText { get; set; }

Gets or sets the style that is to be applied to the input textbox. The style should target RadWatermarkTextBox.

C#
public Style InputTextBoxStyle { get; set; }

Gets of sets a boolean value indicating whether the AIPromptOutputItems should be paged in the output view.

C#
public bool IsPagingEnabled { get; set; }

Gets or sets the command responsible for changing the current page to the first one in the output view.

C#
public DelegateCommand MoveToFirstPageCommand { get; set; }

Gets or sets the command responsible for changing the current page to the last one in the output view.

C#
public DelegateCommand MoveToLastPageCommand { get; set; }

Gets or sets the command responsible for changing the current page to the next one in the output view.

C#
public DelegateCommand MoveToNextPageCommand { get; set; }

Gets or sets the command responsible for changing the current page to the previous one in the output view.

C#
public DelegateCommand MoveToPreviousPageCommand { get; set; }

Gets or sets the command that is executed when the copy button in an AIPromptOutputItem is clicked.

C#
public ICommand OutputItemCopyCommand { get; set; }

Gets or sets the command that is executed when the rating of an AIPromptOutputItem is changed through the UI.

C#
public ICommand OutputItemRatingChangedCommand { get; set; }

Gets or sets the command that is executed when the retry button in an AIPromptOutputItem is clicked.

C#
public ICommand OutputItemRetryCommand { get; set; }

Gets or sets the output items (the responses from the AI).

C#
public ObservableCollection<AIPromptOutputItemModel> OutputItems { get; set; }

Gets the number of pages currently displayed in the output view.

C#
public int PageCount { get; }

Gets the collection view that holds the paged output items.

C#
public QueryableCollectionView PagedOutputItems { get; }

Gets of sets the number of items to display in a single page in the output view.

C#
public int PageSize { get; set; }

Gets or sets the command that is executed when the end-user makes a request by pressing the input button or a command.

C#
public ICommand PromptRequestCommand { get; set; }

Gets or sets the command that is executed when an input suggestion is clicked.

C#
public ICommand SuggestionClickedCommand { get; set; }

Gets or sets DataTemplate applied to the that displays the Suggestions collection.

C#
public DataTemplate SuggestionItemTemplate { get; set; }

Gets or sets the suggestions. The default SuggestionItemTemplate expects string objects.

C#
public IEnumerable Suggestions { get; set; }
Remarks:

You can populate this collection with objects from a custom class and set the SuggestionItemTemplate property to customize their UI.

Gets or sets Style applied to the RadExpander that displays the Suggestions collection.

C#
public Style SuggestionsExpanderStyle { get; set; }

Gets or sets the Content of the suggestions expander.

C#
public object SuggestionsHeaderContent { get; set; }

Gets or sets the ContentTemplate of the suggestions expander.

C#
public DataTemplate SuggestionsHeaderContentTemplate { get; set; }

Methods

C#
protected override DependencyObject GetContainerForItemOverride()
Returns:

DependencyObject

C#
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters:itemobjectReturns:

bool

C#
public override void OnApplyTemplate()

Returns an automation peer for this RadAIPrompt.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

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

Called when a new item is added to the OutputItems collection.

C#
protected virtual void OnOutputItemAdded()

Called when the copy button of an AIPromptOutputItem is clicked.

C#
protected virtual void OnOutputItemCopy(AIPromptOutputItemModel outputItem)
Parameters:outputItemAIPromptOutputItemModel

The AIPromptOutputItemModel from the OutputItems collection.

Called when the rating of an AIPromptOutputItem is changed through the UI.

C#
protected virtual void OnOutputItemRatingChanged(AIPromptOutputItemModel outputItem)
Parameters:outputItemAIPromptOutputItemModel

The AIPromptOutputItemModel from the OutputItems collection.

Called when the retry button of an AIPromptOutputItem is clicked.

C#
protected virtual void OnOutputItemRetry(AIPromptOutputItemModel outputItem)
Parameters:outputItemAIPromptOutputItemModel

The AIPromptOutputItemModel from the OutputItems collection.

Called when the end-user makes a request by pressing the input button or a command.

C#
protected virtual void OnPromptRequest(PromptRequestEventArgs args)
Parameters:argsPromptRequestEventArgs

The PromptRequestEventArgs describing the event.

Called when a prompt suggestion is clicked.

C#
protected virtual void OnSuggestionClicked(object suggestion)
Parameters:suggestionobject

The object from the Suggestions collection.

C#
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObjectitemobject

Resets the theme.

C#
public void ResetTheme()

Events

Event is raised when the user initiates a prompt request.

C#
public event EventHandler<PromptRequestEventArgs> PromptRequest
In this article
DefinitionConstructorsRadAIPrompt()FieldsActiveItemPropertyAreSuggestionsVisiblePropertyCommandsPropertyCurrentPageIndexPropertyHeaderBackgroundPropertyHeaderMinHeightPropertyInputButtonContentPropertyInputButtonContentTemplatePropertyInputTextBoxStylePropertyInputTextPropertyIsPagingEnabledPropertyMoveToFirstPageCommandPropertyMoveToLastPageCommandPropertyMoveToNextPageCommandPropertyMoveToPreviousPageCommandPropertyOutputItemCopyCommandPropertyOutputItemRatingChangedCommandPropertyOutputItemRetryCommandPropertyOutputItemsPropertyPageCountPropertyPagedOutputItemsPropertyPageSizePropertyPromptRequestCommandPropertyPromptRequestEventSuggestionClickedCommandPropertySuggestionItemTemplatePropertySuggestionsExpanderStylePropertySuggestionsHeaderContentPropertySuggestionsHeaderContentTemplatePropertySuggestionsPropertyPropertiesActiveItemAreSuggestionsVisibleCommandsCurrentPageIndexHeaderBackgroundHeaderMinHeightInputButtonContentInputButtonContentTemplateInputTextInputTextBoxStyleIsPagingEnabledMoveToFirstPageCommandMoveToLastPageCommandMoveToNextPageCommandMoveToPreviousPageCommandOutputItemCopyCommandOutputItemRatingChangedCommandOutputItemRetryCommandOutputItemsPageCountPagedOutputItemsPageSizePromptRequestCommandSuggestionClickedCommandSuggestionItemTemplateSuggestionsSuggestionsExpanderStyleSuggestionsHeaderContentSuggestionsHeaderContentTemplateMethodsGetContainerForItemOverride()IsItemItsOwnContainerOverride(object)OnApplyTemplate()OnCreateAutomationPeer()OnInitialized(EventArgs)OnItemsChanged(NotifyCollectionChangedEventArgs)OnOutputItemAdded()OnOutputItemCopy(AIPromptOutputItemModel)OnOutputItemRatingChanged(AIPromptOutputItemModel)OnOutputItemRetry(AIPromptOutputItemModel)OnPromptRequest(PromptRequestEventArgs)OnSuggestionClicked(object)PrepareContainerForItemOverride(DependencyObject, object)ResetTheme()EventsPromptRequest
Not finding the help you need?
Contact Support