RadSmartPasteButton
Represents a button that performs AI-powered smart paste. When clicked, the button reads the clipboard content, gathers field metadata from the assigned Provider, raises the SmartPasteRequest event so the application can send the data to an AI service, and then distributes the extracted values back to the provider's fields. The button supports a processing visual state with built-in cancellation.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadSmartPasteButton : RadButtonBase
Inheritance: objectRadButtonBaseRadSmartPasteButton
Inherited Members
Constructors
public RadSmartPasteButton()
Fields
FontAttributesProperty
BindableProperty
Identifies the FontAttributes property.
public static readonly BindableProperty FontAttributesProperty
FontFamilyProperty
BindableProperty
Identifies the FontFamily property.
public static readonly BindableProperty FontFamilyProperty
FontSizeProperty
BindableProperty
Identifies the FontSize property.
public static readonly BindableProperty FontSizeProperty
IconFontAttributesProperty
BindableProperty
Identifies the IconFontAttributes property.
public static readonly BindableProperty IconFontAttributesProperty
IconFontFamilyProperty
BindableProperty
Identifies the IconFontFamily property.
public static readonly BindableProperty IconFontFamilyProperty
IconFontSizeProperty
BindableProperty
Identifies the IconFontSize property.
public static readonly BindableProperty IconFontSizeProperty
IconTextColorProperty
BindableProperty
Identifies the IconTextColor property.
public static readonly BindableProperty IconTextColorProperty
IconTextProperty
BindableProperty
Identifies the IconText property.
public static readonly BindableProperty IconTextProperty
IsProcessingProperty
BindableProperty
Identifies the IsProcessing property.
public static readonly BindableProperty IsProcessingProperty
ProviderProperty
BindableProperty
Identifies the Provider property.
public static readonly BindableProperty ProviderProperty
SmartPasteRequestCommandProperty
BindableProperty
Identifies the SmartPasteRequestCommand property.
public static readonly BindableProperty SmartPasteRequestCommandProperty
TextColorProperty
BindableProperty
Identifies the TextColor property.
public static readonly BindableProperty TextColorProperty
TextDecorationsProperty
BindableProperty
Identifies the TextDecorations property.
public static readonly BindableProperty TextDecorationsProperty
TextProperty
BindableProperty
Identifies the Text property.
public static readonly BindableProperty TextProperty
Properties
FontAttributes
FontAttributes
Gets or sets the font attributes (bold, italic, or both) applied to the button's text label.
public FontAttributes FontAttributes { get; set; }
Gets or sets the font family used for the button's text label.
public string FontFamily { get; set; }
Gets or sets the font size of the button's text label, in device-independent units.
[TypeConverter(typeof(FontSizeConverter))]
public double FontSize { get; set; }
IconFontAttributes
FontAttributes
Gets or sets the font attributes (bold, italic, or both) applied to the button's icon glyph.
public FontAttributes IconFontAttributes { get; set; }
Gets or sets the font family that contains the icon glyph. By default this is the built-in Telerik icon font.
public string IconFontFamily { get; set; }
Gets or sets the font size of the button's icon glyph, in device-independent units.
[TypeConverter(typeof(FontSizeConverter))]
public double IconFontSize { get; set; }
Gets or sets the icon text from a font family (e.g., Font Awesome, Material Icons).
public string IconText { get; set; }
IconTextColor
Color
Gets or sets the Color used to render the button's icon glyph.
public Color IconTextColor { get; set; }
Gets a value indicating whether the button is in processing state. When true, the button displays a processing visual state.
public bool IsProcessing { get; }
Gets or sets the smart paste provider that supplies fields and handles value assignment for the smart paste operation. Typically, this would be set to a container view (like a Form or Layout) that implements ISmartPasteButtonProvider.
public ISmartPasteButtonProvider Provider { get; set; }
Gets or sets the command that is executed when a smart paste operation is requested. The command parameter is of type SmartPasteButtonRequestContext.
public ICommand SmartPasteRequestCommand { get; set; }
TextColor
Color
Gets or sets the Color used to render the button's text label.
public Color TextColor { get; set; }
TextDecorations
TextDecorations
Gets or sets the text decorations (underline, strikethrough, or both) applied to the button's text label.
public TextDecorations TextDecorations { get; set; }
Methods
protected override void ChangeVisualState()
Overrides:
Events
Occurs when a smart paste operation is requested. Subscribe to this event to initiate the smart paste logic. Use CancellationToken to handle cancellation.
public event EventHandler<SmartPasteButtonRequestContext> SmartPasteRequest
Security — Prompt Injection: The Content property contains raw clipboard text supplied by the user. Before incorporating this value into a prompt sent to an AI service, consider sanitizing or contextually isolating it to prevent prompt injection attacks where malicious clipboard content attempts to override the AI's instructions.