Class
RadSignaturePad

Provides support for drawing and saving signatures.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadSignaturePad : RadBorder, IRadBorder, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewRadBorderRadSignaturePad

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadBorderIRadContentViewITransformIView

Inherited Members RadBorder.BorderColorPropertyRadBorder.CornerRadiusPropertyRadBorder.BorderThicknessPropertyRadBorder.BorderBrushPropertyRadBorder.ChangeVisualState()RadBorder.BorderColorRadBorder.CornerRadiusRadBorder.BorderThicknessRadBorder.BorderBrushRadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnBindingContextChanged()RadContentView.OnHandlerChanged()

Constructors

RadSignaturePad()

Initializes a new instance of the RadSignaturePad class.

Declaration

cs-api-definition
public RadSignaturePad()

Fields

ActualStyleProperty

Identifies the ActualStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualStyleProperty

Field Value

BindableProperty

BackgroundColorProperty

Identifies the BackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundColorProperty

Field Value

BindableProperty

StrokeColorProperty

Identifies the StrokeColor property.

Declaration

cs-api-definition
public static readonly BindableProperty StrokeColorProperty

Field Value

BindableProperty

StrokeThicknessProperty

Identifies the StrokeThickness property.

Declaration

cs-api-definition
public static readonly BindableProperty StrokeThicknessProperty

Field Value

BindableProperty

StyleProperty

Identifies the Style property.

Declaration

cs-api-definition
public static readonly BindableProperty StyleProperty

Field Value

BindableProperty

Properties

ActualStyle

Gets the result from merging the Style property with the default Style of the control.

Declaration

cs-api-definition
public Style ActualStyle { get; }

Property Value

Style

BackgroundColor

Declaration

cs-api-definition
public Color BackgroundColor { get; set; }

Property Value

Color

ClearCommand

Gets a command to clear the RadSignaturePad.

The following example demonstrates how to use RadSignaturePad in XAML with a Button that clears the signature pad by binding its Command property to ClearCommand.

<telerik:RadSignaturePad x:Name="signaturePad" />
<Button Text="Clear" Command="{Binding Source={x:Reference signaturePad}, Path=ClearCommand}" />

Declaration

cs-api-definition
public ICommand ClearCommand { get; }

Property Value

ICommand

StrokeColor

Gets or sets the stroke color for the signature.

Declaration

cs-api-definition
public Color StrokeColor { get; set; }

Property Value

Color

StrokeThickness

Gets or sets the stroke thickness for the signature.

Declaration

cs-api-definition
public double StrokeThickness { get; set; }

Property Value

double

Style

Gets or sets a Style to be applied to the RadSignaturePad.

Declaration

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

Property Value

Style

Methods

SaveImageAsync(Stream)

Saves drawn signature to the specified stream, encoding it as Png, using the RadSignaturePad's , StrokeColor and StrokeThickness.

Declaration

cs-api-definition
public Task SaveImageAsync(Stream outputStream)

Parameters

outputStream

Stream

Specifies the output stream to save the image to.

Returns

Task

Returns a Task to await the asynchronous operation.

Exceptions

ArgumentNullException

The image buffer data is null.

ArgumentOutOfRangeException

The image buffer data count is negative number.

IOException

An I/O error occured, such as the specified file cannot be found.

NotSupportedException

The outputStream does not support writing.

ObjectDisposedException

Writing to outputStream is called after the stream was closed.

SaveImageAsync(Stream, SaveImageSettings)

Saves drawn signature to the specified stream, encoding it using the provided SaveImageSettings.

Declaration

cs-api-definition
public Task SaveImageAsync(Stream outputStream, SaveImageSettings settings)

Parameters

outputStream

Stream

Specifies the output stream to save the image to.

settings

SaveImageSettings

Specifies the SaveImageSettings to be used for encoding the image.

Returns

Task

Returns a Task to await the asynchronous operation.

Exceptions

ArgumentNullException

The image buffer data is null.

ArgumentOutOfRangeException

The image buffer data count is negative number.

IOException

An I/O error occured, such as the specified file cannot be found.

NotSupportedException

The outputStream does not support writing.

ObjectDisposedException

Writing to outputStream is called after the stream was closed.

Exception

Unable to allocate pixels for the bitmap. Can occur with big values for ScaleFactor.

Events

Cleared

Raised when the surface of RadSignaturePad is cleared.

Declaration

cs-api-definition
public event EventHandler Cleared

Event Value

EventHandler

StrokeCompleted

Raised when a new stroke is completed in RadSignaturePad.

Declaration

cs-api-definition
public event EventHandler StrokeCompleted

Event Value

EventHandler

StrokeStarted

Raised when a new stroke is started in RadSignaturePad.

Declaration

cs-api-definition
public event EventHandler StrokeStarted

Event Value

EventHandler