Class
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:

cs-api-definition
public class RadSmartPasteButton : RadButtonBase

Inheritance: objectRadButtonBaseRadSmartPasteButton

Inherited Members RadButtonBase.IsPressedPropertyRadButtonBase.CommandPropertyRadButtonBase.CommandParameterPropertyRadButtonBase.StylePropertyRadButtonBase.ControlTemplatePropertyRadButtonBase.BackgroundColorPropertyRadButtonBase.BackgroundPropertyRadButtonBase.PaddingPropertyRadButtonBase.BorderColorPropertyRadButtonBase.BorderBrushPropertyRadButtonBase.BorderThicknessPropertyRadButtonBase.CornerRadiusPropertyRadButtonBase.OnApplyTemplate()RadButtonBase.OnPropertyChanged(string)RadButtonBase.OnHandlerChanging(HandlerChangingEventArgs)RadButtonBase.OnHandlerChanged()RadButtonBase.IsPressedRadButtonBase.CommandRadButtonBase.CommandParameterRadButtonBase.StyleRadButtonBase.ControlTemplateRadButtonBase.BackgroundColorRadButtonBase.BackgroundRadButtonBase.PaddingRadButtonBase.BorderColorRadButtonBase.BorderBrushRadButtonBase.BorderThicknessRadButtonBase.CornerRadiusRadButtonBase.IsEnabledCoreRadButtonBase.ClickedRadButtonBase.PressedRadButtonBase.Released

Constructors

RadSmartPasteButton()

Initializes a new instance of the RadSmartPasteButton class.

Declaration

cs-api-definition
public RadSmartPasteButton()

Fields

FontAttributesProperty

Identifies the FontAttributes property.

Declaration

cs-api-definition
public static readonly BindableProperty FontAttributesProperty

Field Value

BindableProperty

FontFamilyProperty

Identifies the FontFamily property.

Declaration

cs-api-definition
public static readonly BindableProperty FontFamilyProperty

Field Value

BindableProperty

FontSizeProperty

Identifies the FontSize property.

Declaration

cs-api-definition
public static readonly BindableProperty FontSizeProperty

Field Value

BindableProperty

IconFontAttributesProperty

Identifies the IconFontAttributes property.

Declaration

cs-api-definition
public static readonly BindableProperty IconFontAttributesProperty

Field Value

BindableProperty

IconFontFamilyProperty

Identifies the IconFontFamily property.

Declaration

cs-api-definition
public static readonly BindableProperty IconFontFamilyProperty

Field Value

BindableProperty

IconFontSizeProperty

Identifies the IconFontSize property.

Declaration

cs-api-definition
public static readonly BindableProperty IconFontSizeProperty

Field Value

BindableProperty

IconTextColorProperty

Identifies the IconTextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty IconTextColorProperty

Field Value

BindableProperty

IconTextProperty

Identifies the IconText property.

Declaration

cs-api-definition
public static readonly BindableProperty IconTextProperty

Field Value

BindableProperty

IsProcessingProperty

Identifies the IsProcessing property.

Declaration

cs-api-definition
public static readonly BindableProperty IsProcessingProperty

Field Value

BindableProperty

ProviderProperty

Identifies the Provider property.

Declaration

cs-api-definition
public static readonly BindableProperty ProviderProperty

Field Value

BindableProperty

SmartPasteRequestCommandProperty

Identifies the SmartPasteRequestCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty SmartPasteRequestCommandProperty

Field Value

BindableProperty

TextColorProperty

Identifies the TextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty TextColorProperty

Field Value

BindableProperty

TextDecorationsProperty

Identifies the TextDecorations property.

Declaration

cs-api-definition
public static readonly BindableProperty TextDecorationsProperty

Field Value

BindableProperty

TextProperty

Identifies the Text property.

Declaration

cs-api-definition
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

cs-api-definition
public FontAttributes FontAttributes { get; set; }

Property Value

FontAttributes

FontFamily

Gets or sets the font family used for the button's text label.

Declaration

cs-api-definition
public string FontFamily { get; set; }

Property Value

string

FontSize

Gets or sets the font size of the button's text label, in device-independent units.

Declaration

cs-api-definition
[TypeConverter(typeof(FontSizeConverter))]
public double FontSize { get; set; }

Property Value

double

IconFontAttributes

Gets or sets the font attributes (bold, italic, or both) applied to the button's icon glyph.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public string IconFontFamily { get; set; }

Property Value

string

IconFontSize

Gets or sets the font size of the button's icon glyph, in device-independent units.

Declaration

cs-api-definition
[TypeConverter(typeof(FontSizeConverter))]
public double IconFontSize { get; set; }

Property Value

double

IconText

Gets or sets the icon text from a font family (e.g., Font Awesome, Material Icons).

Declaration

cs-api-definition
public string IconText { get; set; }

Property Value

string

IconTextColor

Gets or sets the Color used to render the button's icon glyph.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public bool IsProcessing { get; }

Property Value

bool

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

cs-api-definition
public ISmartPasteButtonProvider Provider { get; set; }

Property Value

ISmartPasteButtonProvider

SmartPasteRequestCommand

Gets or sets the command that is executed when a smart paste operation is requested. The command parameter is of type SmartPasteButtonRequestContext.

Declaration

cs-api-definition
public ICommand SmartPasteRequestCommand { get; set; }

Property Value

ICommand

Text

Gets or sets the text displayed in the button.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

TextColor

Gets or sets the Color used to render the button's text label.

Declaration

cs-api-definition
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

cs-api-definition
public TextDecorations TextDecorations { get; set; }

Property Value

TextDecorations

Methods

ChangeVisualState()

Declaration

cs-api-definition
protected override void ChangeVisualState()

Overrides RadButtonBase.ChangeVisualState()

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

cs-api-definition
public event EventHandler<SmartPasteButtonRequestContext> SmartPasteRequest

Event Value

EventHandler<SmartPasteButtonRequestContext>

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.