skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadAIPrompt

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

Inheritance
System.Object
RadAIPrompt
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.ConversationalUI.dll

Syntax

[TelerikToolboxCategory("ConversationalUI")]
public class RadAIPrompt : ItemsControl, IThemable

Constructors

RadAIPrompt()

Initializes a new instance of the RadAIPrompt class.

Declaration
public RadAIPrompt()

Fields

ActiveItemProperty

Identifies the ActiveItem dependency property.

Declaration
public static readonly DependencyProperty ActiveItemProperty
Field Value
System.Windows.DependencyProperty

AreSuggestionsVisibleProperty

Identifies the AreSuggestionsVisible property.

Declaration
public static readonly DependencyProperty AreSuggestionsVisibleProperty
Field Value
System.Windows.DependencyProperty

CommandsProperty

Identifies the Commands property.

Declaration
public static readonly DependencyProperty CommandsProperty
Field Value
System.Windows.DependencyProperty

CurrentPageIndexProperty

Identifies the CurrentPageIndex property.

Declaration
public static readonly DependencyProperty CurrentPageIndexProperty
Field Value
System.Windows.DependencyProperty

HeaderBackgroundProperty

Identifies the HeaderBackground property.

Declaration
public static readonly DependencyProperty HeaderBackgroundProperty
Field Value
System.Windows.DependencyProperty

HeaderMinHeightProperty

Identifies the HeaderMinHeight property.

Declaration
public static readonly DependencyProperty HeaderMinHeightProperty
Field Value
System.Windows.DependencyProperty

InputButtonContentProperty

Identifies the InputButtonContent property.

Declaration
public static readonly DependencyProperty InputButtonContentProperty
Field Value
System.Windows.DependencyProperty

InputButtonContentTemplateProperty

Identifies the InputButtonContentTemplate property.

Declaration
public static readonly DependencyProperty InputButtonContentTemplateProperty
Field Value
System.Windows.DependencyProperty

InputTextBoxStyleProperty

Identifies the InputTextBoxStyle property.

Declaration
public static readonly DependencyProperty InputTextBoxStyleProperty
Field Value
System.Windows.DependencyProperty

InputTextProperty

Identifies the InputText property.

Declaration
public static readonly DependencyProperty InputTextProperty
Field Value
System.Windows.DependencyProperty

IsPagingEnabledProperty

Identifies the IsPagingEnabled property.

Declaration
public static readonly DependencyProperty IsPagingEnabledProperty
Field Value
System.Windows.DependencyProperty

MoveToFirstPageCommandProperty

Identifies the MoveToFirstPageCommand dependency property.

Declaration
public static readonly DependencyProperty MoveToFirstPageCommandProperty
Field Value
System.Windows.DependencyProperty

MoveToLastPageCommandProperty

Identifies the MoveToLastPageCommand dependency property.

Declaration
public static readonly DependencyProperty MoveToLastPageCommandProperty
Field Value
System.Windows.DependencyProperty

MoveToNextPageCommandProperty

Identifies the MoveToNextPageCommand dependency property.

Declaration
public static readonly DependencyProperty MoveToNextPageCommandProperty
Field Value
System.Windows.DependencyProperty

MoveToPreviousPageCommandProperty

Identifies the MoveToPreviousPageCommand dependency property.

Declaration
public static readonly DependencyProperty MoveToPreviousPageCommandProperty
Field Value
System.Windows.DependencyProperty

OutputItemCopyCommandProperty

Identifies the OutputItemCopyCommand property.

Declaration
public static readonly DependencyProperty OutputItemCopyCommandProperty
Field Value
System.Windows.DependencyProperty

OutputItemRatingChangedCommandProperty

Identifies the OutputItemRatingChangedCommand property.

Declaration
public static readonly DependencyProperty OutputItemRatingChangedCommandProperty
Field Value
System.Windows.DependencyProperty

OutputItemRetryCommandProperty

Identifies the OutputItemRetryCommand property.

Declaration
public static readonly DependencyProperty OutputItemRetryCommandProperty
Field Value
System.Windows.DependencyProperty

OutputItemsProperty

Identifies the OutputItems property.

Declaration
public static readonly DependencyProperty OutputItemsProperty
Field Value
System.Windows.DependencyProperty

PageCountProperty

Identifies the PageCount dependency property.

Declaration
public static readonly DependencyProperty PageCountProperty
Field Value
System.Windows.DependencyProperty

PagedOutputItemsProperty

Identifies the PagedOutputItems dependency property.

Declaration
public static readonly DependencyProperty PagedOutputItemsProperty
Field Value
System.Windows.DependencyProperty

PageSizeProperty

Identifies the PageSize property.

Declaration
public static readonly DependencyProperty PageSizeProperty
Field Value
System.Windows.DependencyProperty

PromptRequestCommandProperty

Identifies the PromptRequestCommand property.

Declaration
public static readonly DependencyProperty PromptRequestCommandProperty
Field Value
System.Windows.DependencyProperty

PromptRequestEvent

Identifies the event.

Declaration
public static readonly RoutedEvent PromptRequestEvent
Field Value
System.Windows.RoutedEvent

SuggestionClickedCommandProperty

Identifies the SuggestionClickedCommand property.

Declaration
public static readonly DependencyProperty SuggestionClickedCommandProperty
Field Value
System.Windows.DependencyProperty

SuggestionItemTemplateProperty

Identifies the SuggestionItemTemplate property.

Declaration
public static readonly DependencyProperty SuggestionItemTemplateProperty
Field Value
System.Windows.DependencyProperty

SuggestionsExpanderStyleProperty

Identifies the SuggestionsExpanderStyle property.

Declaration
public static readonly DependencyProperty SuggestionsExpanderStyleProperty
Field Value
System.Windows.DependencyProperty

SuggestionsHeaderContentProperty

Identifies the SuggestionsHeaderContent property.

Declaration
public static readonly DependencyProperty SuggestionsHeaderContentProperty
Field Value
System.Windows.DependencyProperty

SuggestionsHeaderContentTemplateProperty

Identifies the SuggestionsHeaderContentTemplate property.

Declaration
public static readonly DependencyProperty SuggestionsHeaderContentTemplateProperty
Field Value
System.Windows.DependencyProperty

SuggestionsProperty

Identifies the Suggestions property.

Declaration
public static readonly DependencyProperty SuggestionsProperty
Field Value
System.Windows.DependencyProperty

Properties

ActiveItem

Gets the currently active item.

Declaration
public RadAIPromptItem ActiveItem { get; }
Property Value
RadAIPromptItem

AreSuggestionsVisible

Gets or sets a boolean value indicating whether the RadExpander that displays the input suggestions is visible.

Declaration
public bool AreSuggestionsVisible { get; set; }
Property Value
System.Boolean

Commands

Gets or sets the AIPrompt commands.

Declaration
public IList<AIPromptCommandBase> Commands { get; set; }
Property Value
System.Collections.Generic.IList<AIPromptCommandBase>

CurrentPageIndex

Gets of sets the index of the current page (starting from 1) in the output view.

Declaration
public int CurrentPageIndex { get; set; }
Property Value
System.Int32

HeaderBackground

Gets or sets the header background.

Declaration
public Brush HeaderBackground { get; set; }
Property Value
System.Windows.Media.Brush

HeaderMinHeight

Gets or sets the header min height.

Declaration
public double HeaderMinHeight { get; set; }
Property Value
System.Double

InputButtonContent

Gets or sets the Content of the input button.

Declaration
public object InputButtonContent { get; set; }
Property Value
System.Object

InputButtonContentTemplate

Gets or sets the System.Windows.DataTemplate applied to the System.Windows.Controls.ContentControl.ContentTemplate property of the input button.

Declaration
public DataTemplate InputButtonContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate

InputText

Gets or sets the input text.

Declaration
public string InputText { get; set; }
Property Value
System.String

InputTextBoxStyle

Gets or sets the style that is to be applied to the input textbox. The style should target RadWatermarkTextBox.

Declaration
public Style InputTextBoxStyle { get; set; }
Property Value
System.Windows.Style

IsPagingEnabled

Gets of sets a boolean value indicating whether the AIPromptOutputItems should be paged in the output view.

Declaration
public bool IsPagingEnabled { get; set; }
Property Value
System.Boolean

MoveToFirstPageCommand

Gets or sets the command responsible for changing the current page to the first one in the output view.

Declaration
public DelegateCommand MoveToFirstPageCommand { get; set; }
Property Value
DelegateCommand

MoveToLastPageCommand

Gets or sets the command responsible for changing the current page to the last one in the output view.

Declaration
public DelegateCommand MoveToLastPageCommand { get; set; }
Property Value
DelegateCommand

MoveToNextPageCommand

Gets or sets the command responsible for changing the current page to the next one in the output view.

Declaration
public DelegateCommand MoveToNextPageCommand { get; set; }
Property Value
DelegateCommand

MoveToPreviousPageCommand

Gets or sets the command responsible for changing the current page to the previous one in the output view.

Declaration
public DelegateCommand MoveToPreviousPageCommand { get; set; }
Property Value
DelegateCommand

OutputItemCopyCommand

Gets or sets the command that is executed when the copy button in an AIPromptOutputItem is clicked.

Declaration
public ICommand OutputItemCopyCommand { get; set; }
Property Value
System.Windows.Input.ICommand

OutputItemRatingChangedCommand

Gets or sets the command that is executed when the rating of an AIPromptOutputItem is changed through the UI.

Declaration
public ICommand OutputItemRatingChangedCommand { get; set; }
Property Value
System.Windows.Input.ICommand

OutputItemRetryCommand

Gets or sets the command that is executed when the retry button in an AIPromptOutputItem is clicked.

Declaration
public ICommand OutputItemRetryCommand { get; set; }
Property Value
System.Windows.Input.ICommand

OutputItems

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

Declaration
public ObservableCollection<AIPromptOutputItemModel> OutputItems { get; set; }
Property Value
System.Collections.ObjectModel.ObservableCollection<AIPromptOutputItemModel>

PageCount

Gets the number of pages currently displayed in the output view.

Declaration
public int PageCount { get; }
Property Value
System.Int32

PagedOutputItems

Gets the collection view that holds the paged output items.

Declaration
public QueryableCollectionView PagedOutputItems { get; }
Property Value
QueryableCollectionView

PageSize

Gets of sets the number of items to display in a single page in the output view.

Declaration
public int PageSize { get; set; }
Property Value
System.Int32

PromptRequestCommand

Gets or sets the command that is executed when the end-user makes a request by pressing the input button or a command.

Declaration
public ICommand PromptRequestCommand { get; set; }
Property Value
System.Windows.Input.ICommand

SuggestionClickedCommand

Gets or sets the command that is executed when an input suggestion is clicked.

Declaration
public ICommand SuggestionClickedCommand { get; set; }
Property Value
System.Windows.Input.ICommand

SuggestionItemTemplate

Gets or sets System.Windows.DataTemplate applied to the System.Windows.Controls.ItemsControl.ItemTemplate that displays the Suggestions collection.

Declaration
public DataTemplate SuggestionItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Suggestions

Gets or sets the suggestions. The default SuggestionItemTemplate expects string objects.

Declaration
public IEnumerable Suggestions { get; set; }
Property Value
System.Collections.IEnumerable

Remarks

You can populate this collection with objects from a custom class and set the SuggestionItemTemplate property to customize their UI.

SuggestionsExpanderStyle

Gets or sets System.Windows.Style applied to the RadExpander that displays the Suggestions collection.

Declaration
public Style SuggestionsExpanderStyle { get; set; }
Property Value
System.Windows.Style

SuggestionsHeaderContent

Gets or sets the Content of the suggestions expander.

Declaration
public object SuggestionsHeaderContent { get; set; }
Property Value
System.Object

SuggestionsHeaderContentTemplate

Gets or sets the ContentTemplate of the suggestions expander.

Declaration
public DataTemplate SuggestionsHeaderContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Methods

GetContainerForItemOverride()

Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
System.Windows.DependencyObject

IsItemItsOwnContainerOverride(Object)

Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
System.Object item

Returns
System.Boolean

OnApplyTemplate()

Declaration
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns an automation peer for this RadAIPrompt.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer

OnInitialized(EventArgs)

Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs e

OnItemsChanged(NotifyCollectionChangedEventArgs)

Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
System.Collections.Specialized.NotifyCollectionChangedEventArgs e

OnOutputItemAdded()

Called when a new item is added to the OutputItems collection.

Declaration
protected virtual void OnOutputItemAdded()

OnOutputItemCopy(AIPromptOutputItemModel)

Called when the copy button of an AIPromptOutputItem is clicked.

Declaration
protected virtual void OnOutputItemCopy(AIPromptOutputItemModel outputItem)
Parameters
AIPromptOutputItemModel outputItem

The AIPromptOutputItemModel from the OutputItems collection.

OnOutputItemRatingChanged(AIPromptOutputItemModel)

Called when the rating of an AIPromptOutputItem is changed through the UI.

Declaration
protected virtual void OnOutputItemRatingChanged(AIPromptOutputItemModel outputItem)
Parameters
AIPromptOutputItemModel outputItem

The AIPromptOutputItemModel from the OutputItems collection.

OnOutputItemRetry(AIPromptOutputItemModel)

Called when the retry button of an AIPromptOutputItem is clicked.

Declaration
protected virtual void OnOutputItemRetry(AIPromptOutputItemModel outputItem)
Parameters
AIPromptOutputItemModel outputItem

The AIPromptOutputItemModel from the OutputItems collection.

OnPromptRequest(PromptRequestEventArgs)

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

Declaration
protected virtual void OnPromptRequest(PromptRequestEventArgs args)
Parameters
PromptRequestEventArgs args

The PromptRequestEventArgs describing the event.

OnSuggestionClicked(Object)

Called when a prompt suggestion is clicked.

Declaration
protected virtual void OnSuggestionClicked(object suggestion)
Parameters
System.Object suggestion

The System.Object from the Suggestions collection.

PrepareContainerForItemOverride(DependencyObject, Object)

Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject element

System.Object item

ResetTheme()

Resets the theme.

Declaration
public void ResetTheme()

Events

PromptRequest

Event is raised when the user initiates a prompt request.

Declaration
public event EventHandler<PromptRequestEventArgs> PromptRequest
Event Type
System.EventHandler<PromptRequestEventArgs>

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.