Displays an output card with its title, submitted prompt, response, and copy, retry, and rating actions.
Definition
Namespace:Telerik.WinControls.UI.AIPrompt
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class AIPromptOutputVisualItem : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementAIPromptOutputVisualItem...
Implements:
Inherited Members
Constructors
public AIPromptOutputVisualItem()
Properties
Gets the buttons container.
public AIPromptButtonsContainer ButtonsContainer { get; }
Gets the content element. Used to display the response text.
public LightVisualElement ContentElement { get; }
Gets the copy button element.
public AIPromptButtonElement CopyButtonElement { get; }
Gets the dislike button element.
public AIPromptToggleButtonElement DislikeButtonElement { get; }
Gets the header element.
public LightVisualElement HeaderElement { get; }
Gets or sets the submitted prompt text displayed in the card.
public string InputText { get; set; }
Gets the like button element.
public AIPromptToggleButtonElement LikeButtonElement { get; }
Gets the main elements stack.
public StackLayoutElementLite MainStack { get; }
Gets the prompt element.
public LightVisualElement PromptElement { get; }
Gets or sets the rating stored in the associated output item.
public double Rating { get; set; }
Gets or sets the response text displayed in the card.
public string ResponseText { get; set; }
Gets the retry button element.
public AIPromptButtonElement RetryButtonElement { get; }
Methods
Creates the container for the card's copy, retry, like, and dislike buttons.
protected virtual AIPromptButtonsContainer CreateButtonsContainer()
Creates the card's text elements and action buttons, and connects the actions to the owning prompt control.
protected override void CreateChildElements()
Overrides:
Creates the text element that displays the response.
Creates the button that triggers the output-item copy action.
Creates the toggle button used to apply a negative rating.
protected virtual AIPromptToggleButtonElement CreateDislikeButtonElement()
Creates the text element that displays the card title.
Creates the toggle button used to apply a positive rating.
protected virtual AIPromptToggleButtonElement CreateLikeButtonElement()
Creates the vertical stack that arranges the card's header, prompt, response, and buttons.
Creates the text element that displays the submitted prompt.
Creates the button that triggers the output-item retry action.
protected virtual AIPromptButtonElement CreateRetryButtonElement()
Sets the card's visual defaults and enables mouse input handling.
protected override void InitializeFields()
Overrides:
Updates the selected rating button, stores the rating, and notifies the owning prompt control.
protected virtual void OnRatingChanged(double newRating)
The rating to apply; positive values select like, negative values select dislike, and zero clears both.
Binds the card to an output item and synchronizes its text and rating-button selection.
protected virtual void SynchronizeProperties(AIPromptOutputItem outputItem)
The output data to display in this card.