RadAIPromptButton
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
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.
public RadAIPromptButton()
Properties
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.
public RadAIPrompt AIPrompt { get; set; }
Gets the default size of the AI prompt button control. The default size is optimized for typical button usage scenarios.
protected override Size DefaultSize { get; }
Overrides:
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.
[Browsable(false)]
public bool IsPopupOpen { get; set; }
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.
public int PopupHeight { get; set; }
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.
[Browsable(true)]
public NotifyIconAnimationType PopupHideAnimation { get; set; }
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.
[Browsable(true)]
public NotifyIconAnimationType PopupShowAnimation { get; set; }
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.
public int PopupWidth { get; set; }
Methods
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.
Creates the AI prompt button element that provides the clickable interface for the control. Override this method to provide a custom implementation of AIPromptActionButtonElement.
protected virtual AIPromptActionButtonElement CreateAIPromptButtonElement()
A new instance of AIPromptActionButtonElement.
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.
protected override void CreateChildItems(RadElement parent)
The parent RadElement that will contain the button element.
Overrides:
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.
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.
protected override void OnThemeNameChanged(ThemeNameChangedEventArgs e)
The ThemeNameChangedEventArgs containing theme change information.
Overrides: