Class
RadAIPrompt

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

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadAIPrompt : RadBorderContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewRadCompositeContentViewRadBorderContentViewRadAIPrompt

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadContentViewITransformIView

Inherited Members RadBorderContentView.BackgroundColorPropertyRadBorderContentView.BackgroundPropertyRadBorderContentView.BorderColorPropertyRadBorderContentView.BorderBrushPropertyRadBorderContentView.BorderThicknessPropertyRadBorderContentView.CornerRadiusPropertyRadBorderContentView.ContentPaddingPropertyRadBorderContentView.BackgroundColorRadBorderContentView.BackgroundRadBorderContentView.BorderColorRadBorderContentView.BorderBrushRadBorderContentView.BorderThicknessRadBorderContentView.CornerRadiusRadBorderContentView.ContentPaddingRadCompositeContentView.StylePropertyRadCompositeContentView.OnApplyTemplate()RadCompositeContentView.OnBindingContextChanged()RadCompositeContentView.OnPropertyChanged(string)RadCompositeContentView.StyleRadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnHandlerChanged()

Constructors

RadAIPrompt()

Initializes a new instance of the class.

Declaration

cs-api-definition
public RadAIPrompt()

Fields

AutoGenerateViewsProperty

Identifies the AutoGenerateViews property.

Declaration

cs-api-definition
public static readonly BindableProperty AutoGenerateViewsProperty

Field Value

BindableProperty

CommandGroupStyleProperty

Identifies the CommandGroupStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty CommandGroupStyleProperty

Field Value

BindableProperty

CommandStyleProperty

Identifies the CommandStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty CommandStyleProperty

Field Value

BindableProperty

CommandTappedCommandProperty

Identifies the CommandTappedCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty CommandTappedCommandProperty

Field Value

BindableProperty

CommandsProperty

Identifies the Commands property.

Declaration

cs-api-definition
public static readonly BindableProperty CommandsProperty

Field Value

BindableProperty

ControlTemplateProperty

Identifies the ControlTemplate property.

Declaration

cs-api-definition
public static readonly BindableProperty ControlTemplateProperty

Field Value

BindableProperty

InputButtonStyleProperty

Identifies the InputButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty InputButtonStyleProperty

Field Value

BindableProperty

InputButtonTextProperty

Identifies the InputButtonText property.

Declaration

cs-api-definition
public static readonly BindableProperty InputButtonTextProperty

Field Value

BindableProperty

InputEditorStyleProperty

Identifies the InputEditorStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty InputEditorStyleProperty

Field Value

BindableProperty

InputTextProperty

Identifies the InputText property.

Declaration

cs-api-definition
public static readonly BindableProperty InputTextProperty

Field Value

BindableProperty

OutputItemCopyCommandProperty

Identifies the OutputItemCopyCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty OutputItemCopyCommandProperty

Field Value

BindableProperty

OutputItemRatingChangedCommandProperty

Identifies the OutputItemRatingChangedCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty OutputItemRatingChangedCommandProperty

Field Value

BindableProperty

OutputItemRetryCommandProperty

Identifies the OutputItemRetryCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty OutputItemRetryCommandProperty

Field Value

BindableProperty

OutputItemStyleProperty

Identifies the OutputItemStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty OutputItemStyleProperty

Field Value

BindableProperty

OutputItemsProperty

Identifies the Suggestions property.

Declaration

cs-api-definition
public static readonly BindableProperty OutputItemsProperty

Field Value

BindableProperty

PromptRequestCommandProperty

Identifies the PromptRequestCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty PromptRequestCommandProperty

Field Value

BindableProperty

SelectedIndexProperty

Identifies the SelectedIndex property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedIndexProperty

Field Value

BindableProperty

SuggestionStyleProperty

Identifies the SuggestionStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty SuggestionStyleProperty

Field Value

BindableProperty

SuggestionsExpanderStyleProperty

Identifies the SuggestionsExpanderStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty SuggestionsExpanderStyleProperty

Field Value

BindableProperty

SuggestionsHeaderTextProperty

Identifies the SuggestionsHeaderText property.

Declaration

cs-api-definition
public static readonly BindableProperty SuggestionsHeaderTextProperty

Field Value

BindableProperty

SuggestionsProperty

Identifies the Suggestions property.

Declaration

cs-api-definition
public static readonly BindableProperty SuggestionsProperty

Field Value

BindableProperty

TabViewStyleProperty

Identifies the TabViewStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty TabViewStyleProperty

Field Value

BindableProperty

ViewsProperty

Identifies the Views property.

Declaration

cs-api-definition
public static readonly BindableProperty ViewsProperty

Field Value

BindableProperty

Properties

AutoGenerateViews

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

Declaration

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

Property Value

bool

CommandGroupStyle

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

Declaration

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

Property Value

Style

CommandStyle

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

Declaration

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

Property Value

Style

CommandTappedCommand

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

Declaration

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

Property Value

ICommand

Commands

Gets or sets the AIPrompt commands.

Declaration

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

Property Value

IList<AIPromptCommandBase>

ControlTemplate

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

Declaration

cs-api-definition
public ControlTemplate ControlTemplate { get; set; }

Property Value

ControlTemplate

InputButtonStyle

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

Declaration

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

Property Value

Style

InputButtonText

Gets or sets the text of the input button.

Declaration

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

Property Value

string

InputEditorStyle

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

Declaration

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

Property Value

Style

InputText

Gets or sets the input text.

Declaration

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

Property Value

string

OutputItemCopyCommand

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

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 output item changes. The parameter of this command is of type AIPromptOutputItem.

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 is pressed. The parameter of this command is of type AIPromptOutputItem.

Declaration

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

Property Value

ICommand

OutputItemStyle

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

Declaration

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

Property Value

Style

OutputItems

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

Declaration

cs-api-definition
public IList<AIPromptOutputItem> OutputItems { get; set; }

Property Value

IList<AIPromptOutputItem>

PromptRequestCommand

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.

Declaration

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

Property Value

ICommand

SelectedIndex

Gets or sets the index of the selected view.

Declaration

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

Property Value

int

SuggestionStyle

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

Declaration

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

Property Value

Style

Suggestions

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.

Declaration

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

Property Value

IEnumerable

SuggestionsExpanderStyle

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

Declaration

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

Property Value

Style

SuggestionsHeaderText

Gets or sets the text of the suggestions header.

Declaration

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

Property Value

string

TabViewStyle

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

Declaration

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

Property Value

Style

Views

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.

Declaration

cs-api-definition
public IList<AIPromptView> Views { get; set; }

Property Value

IList<AIPromptView>

Methods

ArrangeOverride(Rect)

Declaration

cs-api-definition
protected override Size ArrangeOverride(Rect bounds)

Parameters

bounds

Rect

Returns

Size

MeasureOverride(double, double)

Declaration

cs-api-definition
protected override Size MeasureOverride(double widthConstraint, double heightConstraint)

Parameters

widthConstraint

double

heightConstraint

double

Returns

Size

Events

PromptRequest

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

Declaration

cs-api-definition
public event EventHandler PromptRequest

Event Value

EventHandler