Class
DataGridAIPromptInput

Represents an AI input view for DataGrid with customizable styles and commands for prompt requests and cancellations.

Definition

Namespace:Telerik.Maui.Controls.DataGrid

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class DataGridAIPromptInput : RadContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewDataGridAIPromptInput

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadContentViewITransformIView

Inherited Members RadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnBindingContextChanged()RadContentView.OnHandlerChanged()

Constructors

DataGridAIPromptInput()

Initializes a new instance of the DataGridAIPromptInput class.

Declaration

cs-api-definition
public DataGridAIPromptInput()

Fields

ActualClearButtonStyleProperty

Identifies the ActualClearButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualClearButtonStyleProperty

Field Value

BindableProperty

ActualIconStyleProperty

Identifies the ActualIconStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualIconStyleProperty

Field Value

BindableProperty

ActualSendButtonStyleProperty

Identifies the ActualSendButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualSendButtonStyleProperty

Field Value

BindableProperty

ActualSpeechToTextButtonStyleProperty

Identifies the ActualSpeechToTextButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualSpeechToTextButtonStyleProperty

Field Value

BindableProperty

ActualTextInputStyleProperty

Identifies the ActualTextInputStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualTextInputStyleProperty

Field Value

BindableProperty

BackgroundColorProperty

Identifies the BackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundColorProperty

Field Value

BindableProperty

BackgroundProperty

Identifies the Background property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundProperty

Field Value

BindableProperty

BorderBrushProperty

Identifies the BorderBrush property.

Declaration

cs-api-definition
public static readonly BindableProperty BorderBrushProperty

Field Value

BindableProperty

BorderThicknessProperty

Identifies the BorderThickness property.

Declaration

cs-api-definition
public static readonly BindableProperty BorderThicknessProperty

Field Value

BindableProperty

CancelPromptRequestCommandProperty

Identifies the CancelPromptRequestCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty CancelPromptRequestCommandProperty

Field Value

BindableProperty

ClearButtonStyleProperty

Identifies the ClearButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ClearButtonStyleProperty

Field Value

BindableProperty

ClearButtonVisibilityProperty

Identifies the ClearButtonVisibility property.

Declaration

cs-api-definition
public static readonly BindableProperty ClearButtonVisibilityProperty

Field Value

BindableProperty

ControlTemplateProperty

Identifies the ControlTemplate property.

Declaration

cs-api-definition
public static readonly BindableProperty ControlTemplateProperty

Field Value

BindableProperty

CornerRadiusProperty

Identifies the CornerRadius property.

Declaration

cs-api-definition
public static readonly BindableProperty CornerRadiusProperty

Field Value

BindableProperty

IconStyleProperty

Identifies the IconStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty IconStyleProperty

Field Value

BindableProperty

InputTextProperty

Identifies the InputText property.

Declaration

cs-api-definition
public static readonly BindableProperty InputTextProperty

Field Value

BindableProperty

IsSpeechToTextButtonVisibleProperty

Identifies the IsSpeechToTextButtonVisible property.

Declaration

cs-api-definition
public static readonly BindableProperty IsSpeechToTextButtonVisibleProperty

Field Value

BindableProperty

PaddingProperty

Identifies the Padding property.

Declaration

cs-api-definition
public static readonly BindableProperty PaddingProperty

Field Value

BindableProperty

PromptRequestCommandProperty

Identifies the PromptRequestCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty PromptRequestCommandProperty

Field Value

BindableProperty

SendButtonStyleProperty

Identifies the SendButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty SendButtonStyleProperty

Field Value

BindableProperty

SpeechToTextButtonStyleProperty

Identifies the SpeechToTextButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty SpeechToTextButtonStyleProperty

Field Value

BindableProperty

StyleProperty

Identifies the Style property.

Declaration

cs-api-definition
public static readonly BindableProperty StyleProperty

Field Value

BindableProperty

TextInputStyleProperty

Identifies the TextInputStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty TextInputStyleProperty

Field Value

BindableProperty

Properties

ActualClearButtonStyle

Gets the actual style that is applied to the clear button. This property contains the merged result of the ClearButtonStyle and the default style.

Declaration

cs-api-definition
public Style ActualClearButtonStyle { get; }

Property Value

Style

A Style that represents the merged clear button style.

ActualIconStyle

Gets the actual style that is applied to the icon. This property contains the merged result of the IconStyle and the default style.

Declaration

cs-api-definition
public Style ActualIconStyle { get; }

Property Value

Style

A Style that represents the merged icon style.

ActualSendButtonStyle

Gets the actual style that is applied to the send button. This property contains the merged result of the SendButtonStyle and the default style.

Declaration

cs-api-definition
public Style ActualSendButtonStyle { get; }

Property Value

Style

A Style that represents the merged send button style.

ActualSpeechToTextButtonStyle

Gets the actual style that is applied to the speech-to-text button. This property contains the merged result of the SpeechToTextButtonStyle and the default style.

Declaration

cs-api-definition
public Style ActualSpeechToTextButtonStyle { get; }

Property Value

Style

A Style that represents the merged speech-to-text button style.

ActualTextInputStyle

Gets the actual style that is applied to the inner text input control. This property contains the merged result of the TextInputStyle and the default style.

Declaration

cs-api-definition
public Style ActualTextInputStyle { get; }

Property Value

Style

A Style that represents the merged text input style.

Background

Gets or sets the background brush of the control.

Declaration

cs-api-definition
[TypeConverter(typeof(BrushTypeConverter))]
public Brush Background { get; set; }

Property Value

Brush

BackgroundColor

Gets or sets the background color of the control.

Declaration

cs-api-definition
public Color BackgroundColor { get; set; }

Property Value

Color

BorderBrush

Gets or sets the border brush of the control.

Declaration

cs-api-definition
[TypeConverter(typeof(BrushTypeConverter))]
public Brush BorderBrush { get; set; }

Property Value

Brush

BorderThickness

Gets or sets the border thickness of the control.

Declaration

cs-api-definition
public Thickness BorderThickness { get; set; }

Property Value

Thickness

CancelPromptRequestCommand

Gets or sets the command that is executed when the user requests to cancel the current processing operation.

Declaration

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

Property Value

ICommand

ClearButtonStyle

Gets or sets the style of the RadTemplatedButton that represents the clear button.

Declaration

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

Property Value

Style

A Style that defines the visual appearance of the clear button. When set, this style is merged with the default style.

Example

csharp
<telerik:DataGridAIPromptInput ClearButtonStyle="{StaticResource CustomClearButtonStyle}" />

ClearButtonVisibility

Gets or sets the visibility of the clear button.

Declaration

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

Property Value

ClearButtonVisibility

ControlTemplate

Gets or sets the control template that defines the visual structure of the DataGridAIPromptInput.

Declaration

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

Property Value

ControlTemplate

A ControlTemplate that defines the visual tree for the input view.

Example

csharp
<telerik:DataGridAIPromptInput>
    <telerik:DataGridAIPromptInput.ControlTemplate>
        <ControlTemplate>
            <!-- Custom layout with your styling -->
        </ControlTemplate>
    </telerik:DataGridAIPromptInput.ControlTemplate>
</telerik:DataGridAIPromptInput>

CornerRadius

Gets or sets the corner radius of the control.

Declaration

cs-api-definition
[TypeConverter(typeof(CornerRadiusTypeConverter))]
public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

IconStyle

Gets or sets the style of the that represents the icon.

Declaration

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

Property Value

Style

A Style that defines the visual appearance of the icon. When set, this style is merged with the default style.

Example

csharp
<telerik:DataGridAIPromptInput IconStyle="{StaticResource CustomIconStyle}" />

InputText

Gets or sets the text entered in the input field.

Declaration

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

Property Value

string

A string containing the input text.

Example

csharp
<telerik:DataGridAIPromptInput InputText="{Binding UserInput}" />

IsSpeechToTextButtonVisible

Gets or sets the visibility of the speech-to-text button.

Declaration

cs-api-definition
public bool? IsSpeechToTextButtonVisible { get; set; }

Property Value

bool?

null (default): Auto - visible when input is empty or when listening. true: Always visible. false: Never visible.

Padding

Gets or sets the padding of the control.

Declaration

cs-api-definition
public Thickness Padding { get; set; }

Property Value

Thickness

PromptRequestCommand

Gets or sets the command that is executed when a prompt is requested from the user.

Declaration

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

Property Value

ICommand

SendButtonStyle

Gets or sets the style of the DataGridAISendButton.

Declaration

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

Property Value

Style

A Style that defines the visual appearance of the send button. When set, this style is merged with the default style.

Example

csharp
<telerik:DataGridAIPromptInput SendButtonStyle="{StaticResource CustomSendButtonStyle}" />

SpeechToTextButtonStyle

Gets or sets the style of the RadSpeechToTextButton.

Declaration

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

Property Value

Style

A Style that defines the visual appearance of the speech-to-text button. When set, this style is merged with the default style.

Example

csharp
<telerik:DataGridAIPromptInput SpeechToTextButtonStyle="{StaticResource CustomSpeechButtonStyle}" />

Style

Gets or sets the style applied to the DataGridAIPromptInput. This style can define visual properties such as background, border, and layout characteristics. The final applied style is a merge of the explicit style, implicit theme style, and default style.

Declaration

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

Property Value

Style

A Style that defines the visual appearance of the input view.

TextInputStyle

Gets or sets the style of the RadTextInput used for text input.

Declaration

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

Property Value

Style

A Style that defines the visual appearance of the text input. When set, this style is merged with the default style.

Example

csharp
<telerik:DataGridAIPromptInput TextInputStyle="{StaticResource CustomTextInputStyle}" />

Methods

Focus()

Attempts to set focus to this element.

Declaration

cs-api-definition
public bool Focus()

Returns

bool

OnApplyTemplate()

Called when the control template is applied.

Declaration

cs-api-definition
protected override void OnApplyTemplate()

StopSpeechToTextRecognitionAsync()

Stops the speech to text recognition.

If the speech recognizer is currently in the StartingListening or Listening state, this method will stop the recognition process. If the recognizer is not listening, this method has no effect.

Declaration

cs-api-definition
public Task StopSpeechToTextRecognitionAsync()

Returns

Task

Unfocus()

Unsets keyboard focus on this element.

Declaration

cs-api-definition
public void Unfocus()

Events

CancelPromptRequest

Occurs when the user requests to cancel the current processing operation by clicking the stop button.

Declaration

cs-api-definition
public event EventHandler CancelPromptRequest

Event Value

EventHandler

PromptRequest

Occurs when a prompt is requested from the user on send or completed action.

Declaration

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

Event Value

EventHandler<DataGridPromptRequestEventArgs>