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

Provides support for drawing and saving signatures.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

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

Initializes a new instance of the RadSignaturePad class.

C#
public RadSignaturePad()

Fields

ActualStyleProperty

BindableProperty

Identifies the ActualStyle property.

C#
public static readonly BindableProperty ActualStyleProperty

BackgroundColorProperty

BindableProperty

Identifies the BackgroundColor property.

C#
public static readonly BindableProperty BackgroundColorProperty

StrokeColorProperty

BindableProperty

Identifies the StrokeColor property.

C#
public static readonly BindableProperty StrokeColorProperty

StrokeThicknessProperty

BindableProperty

Identifies the StrokeThickness property.

C#
public static readonly BindableProperty StrokeThicknessProperty

StyleProperty

BindableProperty

Identifies the Style property.

C#
public static readonly BindableProperty StyleProperty

Properties

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

C#
public Style ActualStyle { get; }
C#
public Color BackgroundColor { get; set; }

Gets a command to clear the RadSignaturePad.

csharp
<telerik:RadSignaturePad x:Name="signaturePad" />
<Button Text="Clear" Command="{Binding Source={x:Reference signaturePad}, Path=ClearCommand}" />
C#
public ICommand ClearCommand { get; }

Gets or sets the stroke color for the signature.

C#
public Color StrokeColor { get; set; }

Gets or sets the stroke thickness for the signature.

C#
public double StrokeThickness { get; set; }

Style

Style

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

C#
public Style Style { get; set; }

Methods

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

C#
public Task SaveImageAsync(Stream outputStream, SaveImageSettings settings)
Parameters:outputStreamStream

Specifies the output stream to save the image to.

settingsSaveImageSettings

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.

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

C#
public Task SaveImageAsync(Stream outputStream)
Parameters:outputStreamStream

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.

Events

Raised when the surface of RadSignaturePad is cleared.

C#
public event EventHandler Cleared

Raised when a new stroke is completed in RadSignaturePad.

C#
public event EventHandler StrokeCompleted

Raised when a new stroke is started in RadSignaturePad.

C#
public event EventHandler StrokeStarted