ClassRadAIPromptButton
A button that displays a RadAIPrompt as the child of a Form element.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadAIPromptButton : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadAIPromptButton
Implements:
Inherited Members
Constructors
RadAIPromptButton()
Initializes a new instance of the RadAIPromptButton class with default styling and animation settings. The button is configured with a rounded shape, high-quality smoothing, and fade animation for popup hiding.
Declaration
public RadAIPromptButton()
Properties
AIPrompt
Gets or sets the RadAIPrompt instance that will be displayed in the popup window. When accessed for the first time, a new RadAIPrompt instance is automatically created and configured. The AI prompt includes a close button in its toolbar when used with this button control.
DefaultSize
Gets the default size of the AI prompt button control. The default size is optimized for typical button usage scenarios.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
IsPopupOpen
Gets or sets a value indicating whether the popup window hosting the RadAIPrompt is currently open. Setting this property to true opens the popup, while setting it to false closes it.
Declaration
[Browsable(false)]
public bool IsPopupOpen { get; set; }
Property Value
PopupHeight
Gets or sets the height of the popup window that hosts the RadAIPrompt. This property allows customization of the popup size to accommodate different AI prompt layouts.
PopupHideAnimation
Gets or sets the animation type that is played when the popup window is closed. This property controls the visual transition effect when the AI prompt interface disappears.
Declaration
[Browsable(true)]
public NotifyIconAnimationType PopupHideAnimation { get; set; }
Property Value
PopupShowAnimation
Gets or sets the animation type that is played when the popup window is opened. This property controls the visual transition effect when the AI prompt interface appears.
Declaration
[Browsable(true)]
public NotifyIconAnimationType PopupShowAnimation { get; set; }
Property Value
PopupWidth
Gets or sets the width of the popup window that hosts the RadAIPrompt. This property allows customization of the popup size to accommodate different AI prompt layouts.
Methods
CreateAIPrompt()
Creates a new instance of the RadAIPrompt control that will be hosted in the popup window. Override this method to provide a custom implementation or preconfigured instance of RadAIPrompt.
Declaration
protected virtual RadAIPrompt CreateAIPrompt()
Returns
A new instance of RadAIPrompt.
CreateAIPromptButtonElement()
Creates the AI prompt button element that provides the clickable interface for the control. Override this method to provide a custom implementation of AIPromptActionButtonElement.
Declaration
protected virtual AIPromptActionButtonElement CreateAIPromptButtonElement()
Returns
A new instance of AIPromptActionButtonElement.
CreateChildItems(RadElement)
Creates the child items for the control, including the AI prompt button element with its default SVG icon. This method sets up the visual structure of the button and configures event handlers.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent RadElement that will contain the button element.
Overrides
OnParentChanged(EventArgs)
Handles the event when the parent of the control changes, managing form event subscriptions for popup positioning. This method ensures that the popup window is properly repositioned when the parent form moves or resizes.
OnThemeNameChanged(ThemeNameChangedEventArgs)
Handles the event when the theme name changes, ensuring that the popup window reflects the new theme. This method synchronizes the theme between the button and its associated popup window.
Declaration
protected override void OnThemeNameChanged(ThemeNameChangedEventArgs e)
Parameters
e
The ThemeNameChangedEventArgs containing theme change information.
Overrides