New to Telerik UI for .NET MAUIStart a free 30-day trial

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

Definition

Constructors

Initializes a new instance of the class.

C#
public RadAIPrompt()

Fields

Identifies the AutoGenerateViews property.

C#
public static readonly BindableProperty AutoGenerateViewsProperty

Identifies the CommandGroupStyle property.

C#
public static readonly BindableProperty CommandGroupStyleProperty

CommandsProperty

BindableProperty

Identifies the Commands property.

C#
public static readonly BindableProperty CommandsProperty

CommandStyleProperty

BindableProperty

Identifies the CommandStyle property.

C#
public static readonly BindableProperty CommandStyleProperty

Identifies the CommandTappedCommand property.

C#
public static readonly BindableProperty CommandTappedCommandProperty

ControlTemplateProperty

BindableProperty

Identifies the ControlTemplate property.

C#
public static readonly BindableProperty ControlTemplateProperty

InputButtonStyleProperty

BindableProperty

Identifies the InputButtonStyle property.

C#
public static readonly BindableProperty InputButtonStyleProperty

InputButtonTextProperty

BindableProperty

Identifies the InputButtonText property.

C#
public static readonly BindableProperty InputButtonTextProperty

InputEditorStyleProperty

BindableProperty

Identifies the InputEditorStyle property.

C#
public static readonly BindableProperty InputEditorStyleProperty

InputTextProperty

BindableProperty

Identifies the InputText property.

C#
public static readonly BindableProperty InputTextProperty

Identifies the OutputItemCopyCommand property.

C#
public static readonly BindableProperty OutputItemCopyCommandProperty

Identifies the OutputItemRatingChangedCommand property.

C#
public static readonly BindableProperty OutputItemRatingChangedCommandProperty

Identifies the OutputItemRetryCommand property.

C#
public static readonly BindableProperty OutputItemRetryCommandProperty

OutputItemsProperty

BindableProperty

Identifies the Suggestions property.

C#
public static readonly BindableProperty OutputItemsProperty

OutputItemStyleProperty

BindableProperty

Identifies the OutputItemStyle property.

C#
public static readonly BindableProperty OutputItemStyleProperty

Identifies the PromptRequestCommand property.

C#
public static readonly BindableProperty PromptRequestCommandProperty

SelectedIndexProperty

BindableProperty

Identifies the SelectedIndex property.

C#
public static readonly BindableProperty SelectedIndexProperty

Identifies the SuggestionsExpanderStyle property.

C#
public static readonly BindableProperty SuggestionsExpanderStyleProperty

Identifies the SuggestionsHeaderText property.

C#
public static readonly BindableProperty SuggestionsHeaderTextProperty

SuggestionsProperty

BindableProperty

Identifies the Suggestions property.

C#
public static readonly BindableProperty SuggestionsProperty

SuggestionStyleProperty

BindableProperty

Identifies the SuggestionStyle property.

C#
public static readonly BindableProperty SuggestionStyleProperty

TabViewStyleProperty

BindableProperty

Identifies the TabViewStyle property.

C#
public static readonly BindableProperty TabViewStyleProperty

ViewsProperty

BindableProperty

Identifies the Views property.

C#
public static readonly BindableProperty ViewsProperty

Properties

Gets or sets a value indicating whether to auto-generate views by default.

C#
public bool AutoGenerateViews { get; set; }

Gets or sets the style that is to be applied to the AIPromptCommandGroupView representing an AIPrompt command group.

C#
public Style CommandGroupStyle { get; set; }

Gets or sets the AIPrompt commands.

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

Gets or sets the style that is to be applied to the AIPrompt command.

C#
public Style CommandStyle { get; set; }

Gets or sets the command that is executed when an AIPrompt command is pressed. The parameter of this command is of type AIPromptCommandBase.

C#
public ICommand CommandTappedCommand { get; set; }

ControlTemplate

ControlTemplate

Gets or sets the template that defines the visual appearance of the view.

C#
public ControlTemplate ControlTemplate { get; set; }

Gets or sets the style that is to be applied to the input button.

C#
public Style InputButtonStyle { get; set; }

Gets or sets the text of the input button.

C#
public string InputButtonText { get; set; }

Gets or sets the style that is to be applied to the input editor.

C#
public Style InputEditorStyle { get; set; }

Gets or sets the input text.

C#
public string InputText { get; set; }

Gets or sets the command that is executed when the Copy button is pressed. The parameter of this command is of type AIPromptOutputItem.

C#
public ICommand OutputItemCopyCommand { get; set; }

Gets or sets the command that is executed when the Rating of an output item changes. The parameter of this command is of type AIPromptOutputItem.

C#
public ICommand OutputItemRatingChangedCommand { get; set; }

Gets or sets the command that is executed when the Retry button is pressed. The parameter of this command is of type AIPromptOutputItem.

C#
public ICommand OutputItemRetryCommand { get; set; }

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

C#
public IList<AIPromptOutputItem> OutputItems { get; set; }

Gets or sets the style that is to be applied to the output items.

C#
public Style OutputItemStyle { 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. The parameter of this command is of type string and it's value is the same as the InputText property.

C#
public ICommand PromptRequestCommand { get; set; }

Gets or sets the index of the selected view.

C#
public int SelectedIndex { get; set; }

Gets or sets the suggestions. The items of this collection can be simple string objects. In case more control over the UI is needed, the items in this collection can be objects from a custom class and the SuggestionStyle property can be used to set the ControlTemplate.

C#
public IEnumerable Suggestions { get; set; }

Gets or sets the style that is to be applied to the RadExpander that contains the suggestions.

C#
public Style SuggestionsExpanderStyle { get; set; }

Gets or sets the text of the suggestions header.

C#
public string SuggestionsHeaderText { get; set; }

Gets or sets the style that is to be applied to the suggestions.

C#
public Style SuggestionStyle { get; set; }

Gets or sets the style that is to be applied to the RadTabView that represents the AIPrompt views.

C#
public Style TabViewStyle { get; set; }

Gets or sets the AIPrompt views. The collection can contain the following types of views:

By default, these views are automatically generated when AutoGenerateViews is true. To manually define custom views, set AutoGenerateViews to false and populate this collection with your desired view instances.

C#
public IList<AIPromptView> Views { get; set; }

Methods

C#
protected override Size ArrangeOverride(Rect bounds)
Parameters:boundsRectReturns:

Size

C#
protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
Parameters:widthConstraintdoubleheightConstraintdoubleReturns:

Size

Events

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

C#
public event EventHandler PromptRequest