Class RadAIPromptButton
A button that displays a RadAIPrompt as the child of a System.Windows.Forms.Form element.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadAIPromptButton : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
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.
Declaration
public RadAIPrompt AIPrompt { get; set; }
Property Value
RadAIPrompt
|
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
System.Drawing.Size
|
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
public bool IsPopupOpen { get; set; }
Property Value
System.Boolean
|
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.
Declaration
public int PopupHeight { get; set; }
Property Value
System.Int32
|
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
public NotifyIconAnimationType PopupHideAnimation { get; set; }
Property Value
NotifyIconAnimationType
|
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
public NotifyIconAnimationType PopupShowAnimation { get; set; }
Property Value
NotifyIconAnimationType
|
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.
Declaration
public int PopupWidth { get; set; }
Property Value
System.Int32
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
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
RadAIPrompt
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
AIPromptActionButtonElement
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
RadElement
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.
Declaration
protected override void OnParentChanged(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs containing event data. |
Overrides
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
ThemeNameChangedEventArgs
e
The ThemeNameChangedEventArgs containing theme change information. |