Class
RadAIPrompt

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:

cs-api-definition
[TelerikToolboxCategory("ConversationalUI")]
public class RadAIPrompt : ItemsControl

Inheritance: objectRadAIPrompt

Constructors

RadAIPrompt()

Initializes a new instance of the RadAIPrompt class.

Declaration

cs-api-definition
public RadAIPrompt()

Fields

ActiveItemProperty

Identifies the ActiveItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ActiveItemProperty

Field Value

DependencyProperty

AreSuggestionsVisibleProperty

Identifies the AreSuggestionsVisible property.

Declaration

cs-api-definition
public static readonly DependencyProperty AreSuggestionsVisibleProperty

Field Value

DependencyProperty

CommandsProperty

Identifies the Commands property.

Declaration

cs-api-definition
public static readonly DependencyProperty CommandsProperty

Field Value

DependencyProperty

CurrentPageIndexProperty

Identifies the CurrentPageIndex property.

Declaration

cs-api-definition
public static readonly DependencyProperty CurrentPageIndexProperty

Field Value

DependencyProperty

HeaderBackgroundProperty

Identifies the HeaderBackground property.

Declaration

cs-api-definition
public static readonly DependencyProperty HeaderBackgroundProperty

Field Value

DependencyProperty

HeaderMinHeightProperty

Identifies the HeaderMinHeight property.

Declaration

cs-api-definition
public static readonly DependencyProperty HeaderMinHeightProperty

Field Value

DependencyProperty

InputButtonContentProperty

Identifies the InputButtonContent property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputButtonContentProperty

Field Value

DependencyProperty

InputButtonContentTemplateProperty

Identifies the InputButtonContentTemplate property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputButtonContentTemplateProperty

Field Value

DependencyProperty

InputTextBoxStyleProperty

Identifies the InputTextBoxStyle property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputTextBoxStyleProperty

Field Value

DependencyProperty

InputTextProperty

Identifies the InputText property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputTextProperty

Field Value

DependencyProperty

IsPagingEnabledProperty

Identifies the IsPagingEnabled property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsPagingEnabledProperty

Field Value

DependencyProperty

MoveToFirstPageCommandProperty

Identifies the MoveToFirstPageCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoveToFirstPageCommandProperty

Field Value

DependencyProperty

MoveToLastPageCommandProperty

Identifies the MoveToLastPageCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoveToLastPageCommandProperty

Field Value

DependencyProperty

MoveToNextPageCommandProperty

Identifies the MoveToNextPageCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoveToNextPageCommandProperty

Field Value

DependencyProperty

MoveToPreviousPageCommandProperty

Identifies the MoveToPreviousPageCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MoveToPreviousPageCommandProperty

Field Value

DependencyProperty

OutputItemCopyCommandProperty

Identifies the OutputItemCopyCommand property.

Declaration

cs-api-definition
public static readonly DependencyProperty OutputItemCopyCommandProperty

Field Value

DependencyProperty

OutputItemRatingChangedCommandProperty

Identifies the OutputItemRatingChangedCommand property.

Declaration

cs-api-definition
public static readonly DependencyProperty OutputItemRatingChangedCommandProperty

Field Value

DependencyProperty

OutputItemRetryCommandProperty

Identifies the OutputItemRetryCommand property.

Declaration

cs-api-definition
public static readonly DependencyProperty OutputItemRetryCommandProperty

Field Value

DependencyProperty

OutputItemsProperty

Identifies the OutputItems property.

Declaration

cs-api-definition
public static readonly DependencyProperty OutputItemsProperty

Field Value

DependencyProperty

PageCountProperty

Identifies the PageCount dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PageCountProperty

Field Value

DependencyProperty

PageSizeProperty

Identifies the PageSize property.

Declaration

cs-api-definition
public static readonly DependencyProperty PageSizeProperty

Field Value

DependencyProperty

PagedOutputItemsProperty

Identifies the PagedOutputItems dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PagedOutputItemsProperty

Field Value

DependencyProperty

PromptRequestCommandProperty

Identifies the PromptRequestCommand property.

Declaration

cs-api-definition
public static readonly DependencyProperty PromptRequestCommandProperty

Field Value

DependencyProperty

PromptRequestEvent

Identifies the event.

Declaration

cs-api-definition
public static readonly RoutedEvent PromptRequestEvent

Field Value

RoutedEvent

SuggestionClickedCommandProperty

Identifies the SuggestionClickedCommand property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestionClickedCommandProperty

Field Value

DependencyProperty

SuggestionItemTemplateProperty

Identifies the SuggestionItemTemplate property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestionItemTemplateProperty

Field Value

DependencyProperty

SuggestionsExpanderStyleProperty

Identifies the SuggestionsExpanderStyle property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestionsExpanderStyleProperty

Field Value

DependencyProperty

SuggestionsHeaderContentProperty

Identifies the SuggestionsHeaderContent property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestionsHeaderContentProperty

Field Value

DependencyProperty

SuggestionsHeaderContentTemplateProperty

Identifies the SuggestionsHeaderContentTemplate property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestionsHeaderContentTemplateProperty

Field Value

DependencyProperty

SuggestionsProperty

Identifies the Suggestions property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestionsProperty

Field Value

DependencyProperty

Properties

ActiveItem

Gets the currently active item.

Declaration

cs-api-definition
public RadAIPromptItem ActiveItem { get; }

Property Value

RadAIPromptItem

AreSuggestionsVisible

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

Declaration

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

Property Value

bool

Commands

Gets or sets the AIPrompt commands.

Declaration

cs-api-definition
public IList<AIPromptCommandBase> Commands { get; set; }

Property Value

IList<AIPromptCommandBase>

CurrentPageIndex

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

Declaration

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

Property Value

int

HeaderBackground

Gets or sets the header background.

Declaration

cs-api-definition
public Brush HeaderBackground { get; set; }

Property Value

Brush

HeaderMinHeight

Gets or sets the header min height.

Declaration

cs-api-definition
public double HeaderMinHeight { get; set; }

Property Value

double

InputButtonContent

Gets or sets the Content of the input button.

Declaration

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

Property Value

object

InputButtonContentTemplate

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

Declaration

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

Property Value

DataTemplate

InputText

Gets or sets the input text.

Declaration

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

Property Value

string

InputTextBoxStyle

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

Declaration

cs-api-definition
public Style InputTextBoxStyle { get; set; }

Property Value

Style

IsPagingEnabled

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

Declaration

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

Property Value

bool

MoveToFirstPageCommand

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

Declaration

cs-api-definition
public DelegateCommand MoveToFirstPageCommand { get; set; }

Property Value

DelegateCommand

MoveToLastPageCommand

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

Declaration

cs-api-definition
public DelegateCommand MoveToLastPageCommand { get; set; }

Property Value

DelegateCommand

MoveToNextPageCommand

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

Declaration

cs-api-definition
public DelegateCommand MoveToNextPageCommand { get; set; }

Property Value

DelegateCommand

MoveToPreviousPageCommand

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

Declaration

cs-api-definition
public DelegateCommand MoveToPreviousPageCommand { get; set; }

Property Value

DelegateCommand

OutputItemCopyCommand

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

Declaration

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

Property Value

ICommand

OutputItemRatingChangedCommand

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

Declaration

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

Property Value

ICommand

OutputItemRetryCommand

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

Declaration

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

Property Value

ICommand

OutputItems

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

Declaration

cs-api-definition
public ObservableCollection<AIPromptOutputItemModel> OutputItems { get; set; }

Property Value

ObservableCollection<AIPromptOutputItemModel>

PageCount

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

Declaration

cs-api-definition
public int PageCount { get; }

Property Value

int

PageSize

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

Declaration

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

Property Value

int

PagedOutputItems

Gets the collection view that holds the paged output items.

Declaration

cs-api-definition
public QueryableCollectionView PagedOutputItems { get; }

Property Value

QueryableCollectionView

PromptRequestCommand

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

Declaration

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

Property Value

ICommand

SuggestionClickedCommand

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

Declaration

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

Property Value

ICommand

SuggestionItemTemplate

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

Declaration

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

Property Value

DataTemplate

Suggestions

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

Declaration

cs-api-definition
public IEnumerable Suggestions { get; set; }

Property Value

IEnumerable

Remarks

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

SuggestionsExpanderStyle

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

Declaration

cs-api-definition
public Style SuggestionsExpanderStyle { get; set; }

Property Value

Style

SuggestionsHeaderContent

Gets or sets the Content of the suggestions expander.

Declaration

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

Property Value

object

SuggestionsHeaderContentTemplate

Gets or sets the ContentTemplate of the suggestions expander.

Declaration

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

Property Value

DataTemplate

Methods

GetContainerForItemOverride()

Declaration

cs-api-definition
protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

IsItemItsOwnContainerOverride(object)

Declaration

cs-api-definition
protected override bool IsItemItsOwnContainerOverride(object item)

Parameters

item

object

Returns

bool

OnApplyTemplate()

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns an automation peer for this RadAIPrompt.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnInitialized(EventArgs)

Declaration

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

Parameters

e

EventArgs

OnItemsChanged(NotifyCollectionChangedEventArgs)

Declaration

cs-api-definition
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

OnOutputItemAdded()

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

Declaration

cs-api-definition
protected virtual void OnOutputItemAdded()

OnOutputItemCopy(AIPromptOutputItemModel)

Called when the copy button of an AIPromptOutputItem is clicked.

Declaration

cs-api-definition
protected virtual void OnOutputItemCopy(AIPromptOutputItemModel outputItem)

Parameters

outputItem

AIPromptOutputItemModel

The AIPromptOutputItemModel from the OutputItems collection.

OnOutputItemRatingChanged(AIPromptOutputItemModel)

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

Declaration

cs-api-definition
protected virtual void OnOutputItemRatingChanged(AIPromptOutputItemModel outputItem)

Parameters

outputItem

AIPromptOutputItemModel

The AIPromptOutputItemModel from the OutputItems collection.

OnOutputItemRetry(AIPromptOutputItemModel)

Called when the retry button of an AIPromptOutputItem is clicked.

Declaration

cs-api-definition
protected virtual void OnOutputItemRetry(AIPromptOutputItemModel outputItem)

Parameters

outputItem

AIPromptOutputItemModel

The AIPromptOutputItemModel from the OutputItems collection.

OnPromptRequest(PromptRequestEventArgs)

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

Declaration

cs-api-definition
protected virtual void OnPromptRequest(PromptRequestEventArgs args)

Parameters

args

PromptRequestEventArgs

The PromptRequestEventArgs describing the event.

OnSuggestionClicked(object)

Called when a prompt suggestion is clicked.

Declaration

cs-api-definition
protected virtual void OnSuggestionClicked(object suggestion)

Parameters

suggestion

object

The object from the Suggestions collection.

PrepareContainerForItemOverride(DependencyObject, object)

Declaration

cs-api-definition
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

item

object

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

Events

PromptRequest

Event is raised when the user initiates a prompt request.

Declaration

cs-api-definition
public event EventHandler<PromptRequestEventArgs> PromptRequest

Event Value

EventHandler<PromptRequestEventArgs>

In this article
DefinitionConstructorsRadAIPrompt()FieldsActiveItemPropertyAreSuggestionsVisiblePropertyCommandsPropertyCurrentPageIndexPropertyHeaderBackgroundPropertyHeaderMinHeightPropertyInputButtonContentPropertyInputButtonContentTemplatePropertyInputTextBoxStylePropertyInputTextPropertyIsPagingEnabledPropertyMoveToFirstPageCommandPropertyMoveToLastPageCommandPropertyMoveToNextPageCommandPropertyMoveToPreviousPageCommandPropertyOutputItemCopyCommandPropertyOutputItemRatingChangedCommandPropertyOutputItemRetryCommandPropertyOutputItemsPropertyPageCountPropertyPageSizePropertyPagedOutputItemsPropertyPromptRequestCommandPropertyPromptRequestEventSuggestionClickedCommandPropertySuggestionItemTemplatePropertySuggestionsExpanderStylePropertySuggestionsHeaderContentPropertySuggestionsHeaderContentTemplatePropertySuggestionsPropertyPropertiesActiveItemAreSuggestionsVisibleCommandsCurrentPageIndexHeaderBackgroundHeaderMinHeightInputButtonContentInputButtonContentTemplateInputTextInputTextBoxStyleIsPagingEnabledMoveToFirstPageCommandMoveToLastPageCommandMoveToNextPageCommandMoveToPreviousPageCommandOutputItemCopyCommandOutputItemRatingChangedCommandOutputItemRetryCommandOutputItemsPageCountPageSizePagedOutputItemsPromptRequestCommandSuggestionClickedCommandSuggestionItemTemplateSuggestionsSuggestionsExpanderStyleSuggestionsHeaderContentSuggestionsHeaderContentTemplateMethodsGetContainerForItemOverride()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