ClassRadSmartPasteButton
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
RadSmartPasteButton()
Initializes a new instance of the RadSmartPasteButton class.
Declaration
public RadSmartPasteButton()
Fields
FontAttributesProperty
Identifies the FontAttributes property.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
BindableProperty
FontFamilyProperty
Identifies the FontFamily property.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
BindableProperty
FontSizeProperty
Identifies the FontSize property.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
BindableProperty
IconFontAttributesProperty
Identifies the IconFontAttributes property.
Declaration
public static readonly BindableProperty IconFontAttributesProperty
Field Value
BindableProperty
IconFontFamilyProperty
Identifies the IconFontFamily property.
Declaration
public static readonly BindableProperty IconFontFamilyProperty
Field Value
BindableProperty
IconFontSizeProperty
Identifies the IconFontSize property.
Declaration
public static readonly BindableProperty IconFontSizeProperty
Field Value
BindableProperty
IconTextColorProperty
Identifies the IconTextColor property.
Declaration
public static readonly BindableProperty IconTextColorProperty
Field Value
BindableProperty
IconTextProperty
Identifies the IconText property.
Declaration
public static readonly BindableProperty IconTextProperty
Field Value
BindableProperty
IsProcessingProperty
Identifies the IsProcessing property.
Declaration
public static readonly BindableProperty IsProcessingProperty
Field Value
BindableProperty
ProviderProperty
Identifies the Provider property.
Declaration
public static readonly BindableProperty ProviderProperty
Field Value
BindableProperty
SmartPasteRequestCommandProperty
Identifies the SmartPasteRequestCommand property.
Declaration
public static readonly BindableProperty SmartPasteRequestCommandProperty
Field Value
BindableProperty
TextColorProperty
Identifies the TextColor property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
BindableProperty
TextDecorationsProperty
Identifies the TextDecorations property.
Declaration
public static readonly BindableProperty TextDecorationsProperty
Field Value
BindableProperty
TextProperty
Identifies the Text property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
BindableProperty
Properties
FontAttributes
Gets or sets the font attributes (bold, italic, or both) applied to the button's text label.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
FontAttributes
FontFamily
Gets or sets the font family used for the button's text label.
FontSize
Gets or sets the font size of the button's text label, in device-independent units.
Declaration
[TypeConverter(typeof(FontSizeConverter))]
public double FontSize { get; set; }
Property Value
IconFontAttributes
Gets or sets the font attributes (bold, italic, or both) applied to the button's icon glyph.
Declaration
public FontAttributes IconFontAttributes { get; set; }
Property Value
FontAttributes
IconFontFamily
Gets or sets the font family that contains the icon glyph. By default this is the built-in Telerik icon font.
IconFontSize
Gets or sets the font size of the button's icon glyph, in device-independent units.
Declaration
[TypeConverter(typeof(FontSizeConverter))]
public double IconFontSize { get; set; }
Property Value
IconText
Gets or sets the icon text from a font family (e.g., Font Awesome, Material Icons).
IconTextColor
Gets or sets the Color used to render the button's icon glyph.
Declaration
public Color IconTextColor { get; set; }
Property Value
Color
IsProcessing
Gets a value indicating whether the button is in processing state. When true, the button displays a processing visual state.
Provider
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.
Declaration
public ISmartPasteButtonProvider Provider { get; set; }
Property Value
SmartPasteRequestCommand
Gets or sets the command that is executed when a smart paste operation is requested. The command parameter is of type SmartPasteButtonRequestContext.
Declaration
public ICommand SmartPasteRequestCommand { get; set; }
Property Value
Text
Gets or sets the text displayed in the button.
TextColor
Gets or sets the Color used to render the button's text label.
Declaration
public Color TextColor { get; set; }
Property Value
Color
TextDecorations
Gets or sets the text decorations (underline, strikethrough, or both) applied to the button's text label.
Declaration
public TextDecorations TextDecorations { get; set; }
Property Value
TextDecorations
Methods
ChangeVisualState()
Declaration
protected override void ChangeVisualState()
Overrides
Events
SmartPasteRequest
Occurs when a smart paste operation is requested. Subscribe to this event to initiate the smart paste logic. Use CancellationToken to handle cancellation.
Declaration
public event EventHandler<SmartPasteButtonRequestContext> SmartPasteRequest
Event Value
Remarks
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.