RadInlineAIAssistant
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:
[TelerikToolboxCategory("ConversationalUI")]
public class RadInlineAIAssistant : Control
Inheritance: objectRadInlineAIAssistant
Constructors
Initializes a new instance of the RadInlineAIAssistant class.
public RadInlineAIAssistant()
Fields
AttachOnHandledEventsProperty
DependencyProperty
Identifies the AttachOnHandledEvents dependency property.
public static readonly DependencyProperty AttachOnHandledEventsProperty
ClosedEvent
RoutedEvent
Identifies the Closed routed event.
public static readonly RoutedEvent ClosedEvent
CommandsItemContainerStyleSelectorProperty
DependencyProperty
Identifies the CommandsItemContainerStyleSelector dependency property.
public static readonly DependencyProperty CommandsItemContainerStyleSelectorProperty
CommandsProperty
DependencyProperty
Identifies the Commands dependency property.
public static readonly DependencyProperty CommandsProperty
InlineAIAssistantProperty
DependencyProperty
Identifies the InlineAIAssistant attached property.
public static readonly DependencyProperty InlineAIAssistantProperty
InputAreaBorderStyleProperty
DependencyProperty
Identifies the InputAreaBorderStyle dependency property.
public static readonly DependencyProperty InputAreaBorderStyleProperty
InputAreaPaddingProperty
DependencyProperty
Identifies the InputAreaPadding dependency property.
public static readonly DependencyProperty InputAreaPaddingProperty
InteractionProviderProperty
DependencyProperty
Identifies the InlineAssistantInteractionProvider dependency property.
public static readonly DependencyProperty InteractionProviderProperty
IsOpenProperty
DependencyProperty
Identifies the IsOpen dependency property.
public static readonly DependencyProperty IsOpenProperty
IsProcessingProperty
DependencyProperty
Identifies the IsProcessing dependency property.
public static readonly DependencyProperty IsProcessingProperty
OpenedEvent
RoutedEvent
Identifies the Opened routed event.
public static readonly RoutedEvent OpenedEvent
OpeningEvent
RoutedEvent
Identifies the Opening routed event.
public static readonly RoutedEvent OpeningEvent
OpeningEventNameProperty
DependencyProperty
Identifies the OpeningEventName dependency property.
public static readonly DependencyProperty OpeningEventNameProperty
PromptRequestEvent
RoutedEvent
Identifies the event.
public static readonly RoutedEvent PromptRequestEvent
ResponseMaxHeightProperty
DependencyProperty
Identifies the ResponseMaxHeight dependency property.
public static readonly DependencyProperty ResponseMaxHeightProperty
ResponseTemplateProperty
DependencyProperty
Identifies the ResponseTemplate dependency property.
public static readonly DependencyProperty ResponseTemplateProperty
ResponseViewModelProperty
DependencyProperty
Identifies the ResponseViewModel dependency property.
public static readonly DependencyProperty ResponseViewModelProperty
WatermarkBehaviorProperty
DependencyProperty
Identifies the WatermarkBehavior property.
public static readonly DependencyProperty WatermarkBehaviorProperty
WatermarkContentProperty
DependencyProperty
Identifies the WatermarkContent dependency property.
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.
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.
public ObservableCollection<InlineAIAssistantCommandBase> Commands { get; set; }
CommandsItemContainerStyleSelector
StyleSelector
Gets or sets the StyleSelector that will be used to select the style for the command items in the commands dropdown.
public StyleSelector CommandsItemContainerStyleSelector { get; set; }
InputAreaBorderStyle
Style
Gets or sets the style for the input area border in the RadInlineAIAssistant.
public Style InputAreaBorderStyle { get; set; }
InputAreaPadding
Thickness
Gets or sets the padding for the input area in the RadInlineAIAssistant.
public Thickness InputAreaPadding { get; set; }
Gets or sets the IInlineAssistantInteractionProvider that provides interaction with the element that caused RadInlineAIAssistant to open.
public IInlineAssistantInteractionProvider InteractionProvider { get; set; }
Gets or sets a value indicating whether the RadInlineAIAssistant is currently open.
public bool IsOpen { get; set; }
Gets or sets a value indicating whether the RadInlineAIAssistant is currently processing a prompt request.
public bool IsProcessing { get; set; }
Gets or sets the name of the event that will open the assistant.
public string OpeningEventName { get; set; }
The name of the event.
Gets or sets the maximum height of the response area in the RadInlineAIAssistant.
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.
public DataTemplate ResponseTemplate { get; set; }
Gets or sets the InlineAIAssistantResponseViewModel that provides the response text and visibility state for the InlineAIAssistantResponse control.
public InlineAIAssistantResponseViewModel ResponseViewModel { get; set; }
Gets a value that specifies when the watermark content of control will be hidden.
public WatermarkBehavior WatermarkBehavior { get; set; }
Gets or sets the WatermarkContent of RadPromptInput in the RadInlineAIAssistant.
public object WatermarkContent { get; set; }
Methods
Clears the current response text and hides the response area.
public void ClearResponse()
Gets the value of the InlineAIAssistant property of the specified element.
public static RadInlineAIAssistant GetInlineAIAssistant(FrameworkElement element)
Initializes the interaction provider based on the type of the provided UIElement.
protected virtual void InitializeProvider(UIElement uiElement)
The UIElement for which to initialize the interaction provider.
public override void OnApplyTemplate()
Called when the Closed event occurs.
Returns an automation peer for this RadInlineAIAssistant.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
protected override void OnKeyDown(KeyEventArgs e)
Called when the Opened event occurs.
Called when the Opening event occurs.
Called when the end-user makes a request by pressing the input button or a command.
protected virtual Task OnPromptRequest(InlineAIAssistantPromptRequestEventArgs args)
The PromptRequestEventArgs describing the event.
Returns:Resets the theme of the RadInlineAIAssistant control to its default style.
public void ResetTheme()
Sets the value of the InlineAIAssistant property of the specified element.
public static void SetInlineAIAssistant(FrameworkElement element, RadInlineAIAssistant value)
Events
Closed
RoutedEventHandler
Occurs when a particular instance of a RadInlineAIAssistant closes.
public event RoutedEventHandler Closed
Opened
RoutedEventHandler
Occurs when a particular instance of a RadInlineAIAssistant opens.
public event RoutedEventHandler Opened
Occurs before particular instance of RadInlineAIAssistant opens. If it is handled then RadInlineAIAssistant will not open.
public event RadRoutedEventHandler Opening
Event is raised when the user initiates a prompt request.
public event EventHandler<InlineAIAssistantPromptRequestEventArgs> PromptRequest