AIPromptInputView
Provides prompt entry; when attached to its owner, activating Generate forwards the current text as a prompt request.
Definition
Namespace:Telerik.WinControls.UI.AIPrompt
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class AIPromptInputView : AIPromptViewBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementAIPromptViewBaseAIPromptInputView...
Implements:
Inherited Members
Constructors
Initializes the prompt-entry view with its editor and Generate action.
public AIPromptInputView()
Properties
Gets the button that forwards the current InputText to the owner as a prompt request.
public AIPromptActionButtonElement GenerateButton { get; }
Gets or sets the prompt editor's text; changes are propagated to the owning AI Prompt control when attached.
public string InputText { get; set; }
Gets the text editor used to enter a prompt.
public RadTextBoxElement PromptTextBox { get; }
Gets the stack where custom input content can be placed between the prompt editor and action buttons.
public StackLayoutElementLite Stack { get; }
Methods
Arranges the prompt editor, content stack, and button stack in order, placing the button stack at the bottom when extra height is available.
Creates the stack that hosts the input view's action buttons.
Creates the prompt editor, optional content stack, and generate-button area. When attached to its owner, text changes are synchronized and Generate forwards the current text as a prompt request.
protected override void CreateChildElements()
Overrides:
Creates the content stack between the prompt editor and the action-button area.
Creates the action button that submits the current input text as a prompt request.
protected virtual AIPromptActionButtonElement CreateGenerateButton()
Creates the prompt editor used for entering request text.
Sets the input view's background and removes the base view's padding.
protected override void InitializeFields()
Overrides:
Measures the content stack with unconstrained height and combines the prompt, content, and button sizes.
Excludes the prompt editor and both stacks from base arrangement because this view positions them vertically.
protected override bool ShouldArrangeChild(RadElement child)
The child element being considered for arrangement.
Returns:false for the prompt editor and stacks; otherwise, the base view's arrangement decision.
Overrides:
Excludes the content stack from base measurement because this view measures it with unconstrained height.
protected override bool ShouldMeasureChild(RadElement child)
The child element being considered for measurement.
Returns:false for the content stack; otherwise, the base view's measurement decision.
Overrides: