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

Represents a control that provides an inline AI assistant for text input, allowing users to request prompts and receive responses.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ConversationalUI.dll

Syntax:

C#
[TelerikToolboxCategory("ConversationalUI")]
public class RadInlineAIAssistant : Control

Inheritance: objectRadInlineAIAssistant

Constructors

Initializes a new instance of the RadInlineAIAssistant class.

C#
public RadInlineAIAssistant()

Fields

Identifies the AttachOnHandledEvents dependency property.

C#
public static readonly DependencyProperty AttachOnHandledEventsProperty

ClosedEvent

RoutedEvent

Identifies the Closed routed event.

C#
public static readonly RoutedEvent ClosedEvent

Identifies the CommandsItemContainerStyleSelector dependency property.

C#
public static readonly DependencyProperty CommandsItemContainerStyleSelectorProperty

CommandsProperty

DependencyProperty

Identifies the Commands dependency property.

C#
public static readonly DependencyProperty CommandsProperty

InlineAIAssistantProperty

DependencyProperty

Identifies the InlineAIAssistant attached property.

C#
public static readonly DependencyProperty InlineAIAssistantProperty

Identifies the InputAreaBorderStyle dependency property.

C#
public static readonly DependencyProperty InputAreaBorderStyleProperty

InputAreaPaddingProperty

DependencyProperty

Identifies the InputAreaPadding dependency property.

C#
public static readonly DependencyProperty InputAreaPaddingProperty

InteractionProviderProperty

DependencyProperty

Identifies the InlineAssistantInteractionProvider dependency property.

C#
public static readonly DependencyProperty InteractionProviderProperty

IsOpenProperty

DependencyProperty

Identifies the IsOpen dependency property.

C#
public static readonly DependencyProperty IsOpenProperty

IsProcessingProperty

DependencyProperty

Identifies the IsProcessing dependency property.

C#
public static readonly DependencyProperty IsProcessingProperty

OpenedEvent

RoutedEvent

Identifies the Opened routed event.

C#
public static readonly RoutedEvent OpenedEvent

OpeningEvent

RoutedEvent

Identifies the Opening routed event.

C#
public static readonly RoutedEvent OpeningEvent

OpeningEventNameProperty

DependencyProperty

Identifies the OpeningEventName dependency property.

C#
public static readonly DependencyProperty OpeningEventNameProperty

Identifies the event.

C#
public static readonly RoutedEvent PromptRequestEvent

ResponseMaxHeightProperty

DependencyProperty

Identifies the ResponseMaxHeight dependency property.

C#
public static readonly DependencyProperty ResponseMaxHeightProperty

ResponseTemplateProperty

DependencyProperty

Identifies the ResponseTemplate dependency property.

C#
public static readonly DependencyProperty ResponseTemplateProperty

ResponseViewModelProperty

DependencyProperty

Identifies the ResponseViewModel dependency property.

C#
public static readonly DependencyProperty ResponseViewModelProperty

WatermarkBehaviorProperty

DependencyProperty

Identifies the WatermarkBehavior property.

C#
public static readonly DependencyProperty WatermarkBehaviorProperty

WatermarkContentProperty

DependencyProperty

Identifies the WatermarkContent dependency property.

C#
public static readonly DependencyProperty WatermarkContentProperty

Properties

Gets or sets whether RadInlineAIAssistant will open on handled routed events. The default value is false. This is a dependency property.

C#
public bool AttachOnHandledEvents { get; set; }

Gets or sets the collection of commands shown in the commands dropdown. Use InlineAIAssistantCommand for flat items and InlineAIAssistantCommandGroup for items with a sub-menu. Selecting a command fires PromptRequest with the command's text as the prompt.

C#
public ObservableCollection<InlineAIAssistantCommandBase> Commands { get; set; }

Gets or sets the StyleSelector that will be used to select the style for the command items in the commands dropdown.

C#
public StyleSelector CommandsItemContainerStyleSelector { get; set; }

Gets or sets the style for the input area border in the RadInlineAIAssistant.

C#
public Style InputAreaBorderStyle { get; set; }

Gets or sets the padding for the input area in the RadInlineAIAssistant.

C#
public Thickness InputAreaPadding { get; set; }

Gets or sets the IInlineAssistantInteractionProvider that provides interaction with the element that caused RadInlineAIAssistant to open.

C#
public IInlineAssistantInteractionProvider InteractionProvider { get; set; }

Gets or sets a value indicating whether the RadInlineAIAssistant is currently open.

C#
public bool IsOpen { get; set; }

Gets or sets a value indicating whether the RadInlineAIAssistant is currently processing a prompt request.

C#
public bool IsProcessing { get; set; }

Gets or sets the name of the event that will open the assistant.

C#
public string OpeningEventName { get; set; }
Property Value:

The name of the event.

Gets or sets the maximum height of the response area in the RadInlineAIAssistant.

C#
public double ResponseMaxHeight { get; set; }

ResponseTemplate

DataTemplate

Gets or sets the DataTemplate that defines the visual representation of the response text in the InlineAIAssistantResponse control.

C#
public DataTemplate ResponseTemplate { get; set; }

Gets or sets the InlineAIAssistantResponseViewModel that provides the response text and visibility state for the InlineAIAssistantResponse control.

C#
public InlineAIAssistantResponseViewModel ResponseViewModel { get; set; }

Gets a value that specifies when the watermark content of control will be hidden.

C#
public WatermarkBehavior WatermarkBehavior { get; set; }

Gets or sets the WatermarkContent of RadPromptInput in the RadInlineAIAssistant.

C#
public object WatermarkContent { get; set; }

Methods

Clears the current response text and hides the response area.

C#
public void ClearResponse()

Gets the value of the InlineAIAssistant property of the specified element.

C#
public static RadInlineAIAssistant GetInlineAIAssistant(FrameworkElement element)
Parameters:elementFrameworkElementReturns:

RadInlineAIAssistant

Initializes the interaction provider based on the type of the provided UIElement.

C#
protected virtual void InitializeProvider(UIElement uiElement)
Parameters:uiElementUIElement

The UIElement for which to initialize the interaction provider.

C#
public override void OnApplyTemplate()

Called when the Closed event occurs.

C#
protected virtual void OnClosed(RadRoutedEventArgs e)
Parameters:eRadRoutedEventArgs

Returns an automation peer for this RadInlineAIAssistant.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs
C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

Called when the Opened event occurs.

C#
protected virtual void OnOpened(RadRoutedEventArgs e)
Parameters:eRadRoutedEventArgs

Called when the Opening event occurs.

C#
protected virtual void OnOpening(RadRoutedEventArgs e)
Parameters:eRadRoutedEventArgs

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

C#
protected virtual Task OnPromptRequest(InlineAIAssistantPromptRequestEventArgs args)
Parameters:argsInlineAIAssistantPromptRequestEventArgs

The PromptRequestEventArgs describing the event.

Returns:

Task

Resets the theme of the RadInlineAIAssistant control to its default style.

C#
public void ResetTheme()

Sets the value of the InlineAIAssistant property of the specified element.

C#
public static void SetInlineAIAssistant(FrameworkElement element, RadInlineAIAssistant value)
Parameters:elementFrameworkElementvalueRadInlineAIAssistant

Events

Closed

RoutedEventHandler

Occurs when a particular instance of a RadInlineAIAssistant closes.

C#
public event RoutedEventHandler Closed

Opened

RoutedEventHandler

Occurs when a particular instance of a RadInlineAIAssistant opens.

C#
public event RoutedEventHandler Opened

Occurs before particular instance of RadInlineAIAssistant opens. If it is handled then RadInlineAIAssistant will not open.

C#
public event RadRoutedEventHandler Opening

Event is raised when the user initiates a prompt request.

C#
public event EventHandler<InlineAIAssistantPromptRequestEventArgs> PromptRequest