New to Telerik UI for .NET MAUIStart a free 30-day trial

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

Constructors

C#
public RadSmartPasteButton()

Fields

FontAttributesProperty

BindableProperty

Identifies the FontAttributes property.

C#
public static readonly BindableProperty FontAttributesProperty

FontFamilyProperty

BindableProperty

Identifies the FontFamily property.

C#
public static readonly BindableProperty FontFamilyProperty

FontSizeProperty

BindableProperty

Identifies the FontSize property.

C#
public static readonly BindableProperty FontSizeProperty

Identifies the IconFontAttributes property.

C#
public static readonly BindableProperty IconFontAttributesProperty

IconFontFamilyProperty

BindableProperty

Identifies the IconFontFamily property.

C#
public static readonly BindableProperty IconFontFamilyProperty

IconFontSizeProperty

BindableProperty

Identifies the IconFontSize property.

C#
public static readonly BindableProperty IconFontSizeProperty

IconTextColorProperty

BindableProperty

Identifies the IconTextColor property.

C#
public static readonly BindableProperty IconTextColorProperty

IconTextProperty

BindableProperty

Identifies the IconText property.

C#
public static readonly BindableProperty IconTextProperty

IsProcessingProperty

BindableProperty

Identifies the IsProcessing property.

C#
public static readonly BindableProperty IsProcessingProperty

ProviderProperty

BindableProperty

Identifies the Provider property.

C#
public static readonly BindableProperty ProviderProperty

Identifies the SmartPasteRequestCommand property.

C#
public static readonly BindableProperty SmartPasteRequestCommandProperty

TextColorProperty

BindableProperty

Identifies the TextColor property.

C#
public static readonly BindableProperty TextColorProperty

TextDecorationsProperty

BindableProperty

Identifies the TextDecorations property.

C#
public static readonly BindableProperty TextDecorationsProperty

TextProperty

BindableProperty

Identifies the Text property.

C#
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.

C#
public FontAttributes FontAttributes { get; set; }

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

C#
public string FontFamily { get; set; }

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

C#
[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.

C#
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.

C#
public string IconFontFamily { get; set; }

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

C#
[TypeConverter(typeof(FontSizeConverter))]
public double IconFontSize { get; set; }

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

C#
public string IconText { get; set; }

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

C#
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.

C#
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.

C#
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.

C#
public ICommand SmartPasteRequestCommand { get; set; }

Gets or sets the text displayed in the button.

C#
public string Text { get; set; }

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

C#
public Color TextColor { get; set; }

TextDecorations

TextDecorations

Gets or sets the text decorations (underline, strikethrough, or both) applied to the button's text label.

C#
public TextDecorations TextDecorations { get; set; }

Methods

C#
protected override void ChangeVisualState()

Overrides: RadButtonBase.ChangeVisualState()

Events

Occurs when a smart paste operation is requested. Subscribe to this event to initiate the smart paste logic. Use CancellationToken to handle cancellation.

C#
public event EventHandler<SmartPasteButtonRequestContext> SmartPasteRequest
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.