ClassPromptInputButtonsPanelElement
Represents the buttons panel area of the RadPromptInputElement. Manages the send, clear, speech-to-text, prompt suggestions, and more buttons, along with the suggestion and more-button context menus.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class PromptInputButtonsPanelElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementPromptInputButtonsPanelElement
Implements:
Inherited Members
Constructors
PromptInputButtonsPanelElement()
Initializes a new instance of the PromptInputButtonsPanelElement class.
Declaration
public PromptInputButtonsPanelElement()
Properties
ButtonsPanel
Gets the dock layout panel that hosts the left and right button panels.
Declaration
[Browsable(false)]
public DockLayoutPanel ButtonsPanel { get; }
Property Value
ClearButton
Gets the clear button element.
Declaration
[Browsable(false)]
public LightVisualButtonElement ClearButton { get; }
Property Value
EmptyPromptSuggestionsText
Gets or sets the text displayed inside the prompt-suggestions popup
when both SuggestedPrompts and RecentPrompts
are empty. When set to a non-empty value the popup will open with a single
disabled menu item carrying this text. When null or empty
(default), the popup does not open at all when there are no suggestions.
Declaration
public string EmptyPromptSuggestionsText { get; set; }
Property Value
LeftButtonsPanel
Gets the left buttons panel (suggestions, more).
Declaration
[Browsable(false)]
public StackLayoutElementLite LeftButtonsPanel { get; }
Property Value
MoreButton
Gets the more button element.
Declaration
[Browsable(false)]
public LightVisualButtonElement MoreButton { get; }
Property Value
MoreButtonActions
Gets or sets the collection of action items displayed in the more button popup.
Declaration
[Browsable(false)]
public IList<PromptInputButtonAction> MoreButtonActions { get; set; }
Property Value
IList<PromptInputButtonAction>
PromptSuggestionsButton
Gets the prompt suggestions button element.
Declaration
[Browsable(false)]
public LightVisualButtonElement PromptSuggestionsButton { get; }
Property Value
RecentPrompts
Gets or sets the collection of recent prompts.
Declaration
[Browsable(false)]
public IList<string> RecentPrompts { get; set; }
Property Value
IList<string>
RightButtonsPanel
Gets the right buttons panel (clear, STT, send).
Declaration
[Browsable(false)]
public StackLayoutElementLite RightButtonsPanel { get; }
Property Value
SendButton
Gets the send button element.
Declaration
[Browsable(false)]
public ChatSendButtonElement SendButton { get; }
Property Value
ShowClearButton
Gets or sets a value indicating whether the clear button is visible.
ShowMoreButton
Gets or sets a value indicating whether the more button is visible.
ShowPromptSuggestionsButton
Gets or sets a value indicating whether the prompt suggestions button is visible.
Declaration
public bool ShowPromptSuggestionsButton { get; set; }
Property Value
ShowRecentPrompts
Gets or sets a value indicating whether the recent prompts section is visible in the popup.
ShowSpeechToTextButton
Gets or sets a value indicating whether the speech-to-text button is visible.
ShowSuggestedPrompts
Gets or sets a value indicating whether the suggested prompts section is visible in the popup.
SpeechToTextButton
Gets the speech-to-text button element.
Declaration
[Browsable(false)]
public RadSpeechToTextButtonElement SpeechToTextButton { get; }
Property Value
SuggestedPrompts
Gets or sets the collection of suggested prompts.
Declaration
[Browsable(false)]
public IList<string> SuggestedPrompts { get; set; }
Property Value
IList<string>
Methods
CreateButtonsPanel()
Creates the dock layout panel for buttons. Override to customize.
Declaration
protected virtual DockLayoutPanel CreateButtonsPanel()
Returns
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateClearButton()
Creates the clear button element. Override to customize.
Declaration
protected virtual LightVisualButtonElement CreateClearButton()
Returns
CreateLeftButtonsPanel()
Creates the left buttons panel. Override to customize.
Declaration
protected virtual StackLayoutElementLite CreateLeftButtonsPanel()
Returns
CreateMoreButton()
Creates the more button. Override to customize.
Declaration
protected virtual LightVisualButtonElement CreateMoreButton()
Returns
CreateMoreButtonContextMenu()
Creates the more button context menu dropdown. Override to customize.
Declaration
protected virtual RadContextMenuDropDown CreateMoreButtonContextMenu()
Returns
CreatePromptSuggestionsButton()
Creates the prompt suggestions button. Override to customize.
Declaration
protected virtual PromptInputSuggestionsButton CreatePromptSuggestionsButton()
Returns
CreateRightButtonsPanel()
Creates the right buttons panel. Override to customize.
Declaration
protected virtual StackLayoutElementLite CreateRightButtonsPanel()
Returns
CreateSendButton()
Creates the send button element. Override to customize.
Declaration
protected virtual ChatSendButtonElement CreateSendButton()
Returns
CreateSpeechToTextButton()
Creates the speech-to-text button element. Override to customize.
Declaration
protected virtual RadSpeechToTextButtonElement CreateSpeechToTextButton()
Returns
CreateSuggestionsContextMenu()
Creates the suggestions context menu dropdown. Override to customize.
Declaration
protected virtual RadContextMenuDropDown CreateSuggestionsContextMenu()
Returns
DisposeManagedResources()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
Declaration
protected override void DisposeManagedResources()
Overrides
InitializeFields()
Initializes the internal fields and components of the LightVisualElement. This method sets up text primitives, image primitives, and layout management components.
Declaration
protected override void InitializeFields()
Overrides
OnCancelClicked(EventArgs)
Raises the CancelClicked event.
Declaration
protected virtual void OnCancelClicked(EventArgs args)
Parameters
args
OnClearClicked(EventArgs)
Raises the ClearClicked event.
Declaration
protected virtual void OnClearClicked(EventArgs args)
Parameters
args
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
Event arguments containing information about the property that changed.
Overrides
OnSendClicked(EventArgs)
Raises the SendClicked event.
Declaration
protected virtual void OnSendClicked(EventArgs args)
Parameters
args
OnSuggestionSelected(PromptInputSuggestionSelectedEventArgs)
Raises the SuggestionSelected event.
Declaration
protected virtual void OnSuggestionSelected(PromptInputSuggestionSelectedEventArgs args)
Parameters
args
OnSuggestionSelecting(PromptInputSuggestionSelectingEventArgs)
Raises the SuggestionSelecting event.
Declaration
protected virtual void OnSuggestionSelecting(PromptInputSuggestionSelectingEventArgs args)
Parameters
args
UpdateClearButtonVisibility(bool)
Updates the clear button visibility based on the current text state. Called by the parent element when text changes.
Declaration
public void UpdateClearButtonVisibility(bool hasText)
Parameters
hasText
Whether the input box contains text.
UpdateSendButtonState(bool, bool, bool)
Updates the send button enabled state and icon based on the current state. Called by the parent element when text, files, or processing state changes.
Events
CancelClicked
Occurs when the user clicks the send button while in a processing state.
ClearClicked
Occurs when the clear button is clicked.
SendClicked
Occurs when the user clicks the send button while not in a processing state.
SuggestionSelected
Occurs when the user selects a suggestion from the prompt suggestions dropdown.
Declaration
public event PromptInputSuggestionSelectedEventHandler SuggestionSelected
Event Value
SuggestionSelecting
Occurs before a suggestion is applied. Set Cancel to true to prevent applying.
Declaration
public event PromptInputSuggestionSelectingEventHandler SuggestionSelecting
Event Value