ClassRadSignaturePad
Provides support for drawing and saving signatures.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadSignaturePad : RadBorder, IRadBorder, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance: objectRadContentViewRadBorderRadSignaturePad
Implements:
Inherited Members
Constructors
RadSignaturePad()
Initializes a new instance of the RadSignaturePad class.
Declaration
public RadSignaturePad()
Fields
ActualStyleProperty
Identifies the ActualStyle property.
Declaration
public static readonly BindableProperty ActualStyleProperty
Field Value
BindableProperty
BackgroundColorProperty
Identifies the BackgroundColor property.
Declaration
public static readonly BindableProperty BackgroundColorProperty
Field Value
BindableProperty
StrokeColorProperty
Identifies the StrokeColor property.
Declaration
public static readonly BindableProperty StrokeColorProperty
Field Value
BindableProperty
StrokeThicknessProperty
Identifies the StrokeThickness property.
Declaration
public static readonly BindableProperty StrokeThicknessProperty
Field Value
BindableProperty
StyleProperty
Identifies the Style property.
Declaration
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
public Style ActualStyle { get; }
Property Value
Style
BackgroundColor
Declaration
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}" />
StrokeColor
Gets or sets the stroke color for the signature.
Declaration
public Color StrokeColor { get; set; }
Property Value
Color
StrokeThickness
Gets or sets the stroke thickness for the signature.
Methods
SaveImageAsync(Stream)
Saves drawn signature to the specified stream, encoding it as Png, using the RadSignaturePad's , StrokeColor and StrokeThickness.
Declaration
public Task SaveImageAsync(Stream outputStream)
Parameters
outputStream
Specifies the output stream to save the image to.
Returns
Returns a Task to await the asynchronous operation.
Exceptions
The image buffer data is null.
The image buffer data count is negative number.
An I/O error occured, such as the specified file cannot be found.
The outputStream does not support writing.
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
public Task SaveImageAsync(Stream outputStream, SaveImageSettings settings)
Parameters
outputStream
Specifies the output stream to save the image to.
settings
Specifies the SaveImageSettings to be used for encoding the image.
Returns
Returns a Task to await the asynchronous operation.
Exceptions
The image buffer data is null.
The image buffer data count is negative number.
An I/O error occured, such as the specified file cannot be found.
The outputStream does not support writing.
Writing to outputStream is called after the stream was closed.
Unable to allocate pixels for the bitmap. Can occur with big values for ScaleFactor.
Events
Cleared
Raised when the surface of RadSignaturePad is cleared.
StrokeCompleted
Raised when a new stroke is completed in RadSignaturePad.
StrokeStarted
Raised when a new stroke is started in RadSignaturePad.