Class
PdfViewerDoubleTappedCommand

Represents a command that handles double-tap gestures in the PDF viewer. This command toggles between fit-to-width and magnified zoom levels when the user double-taps on the PDF document.

Definition

Constructors

PdfViewerDoubleTappedCommand()

Declaration

cs-api-definition
public PdfViewerDoubleTappedCommand()

Methods

CanExecute(object)

Determines whether the command can be executed with the specified parameter.

Declaration

cs-api-definition
public override bool CanExecute(object parameter)

Parameters

parameter

object

The parameter to check, expected to be a Point representing the tap location.

Returns

bool

true if the parameter is a Point and the PDF document has pages; otherwise, false.

Overrides PdfViewerCommand.CanExecute(object)

Execute(object)

Executes the double-tap command by toggling between fit-to-width and magnified zoom levels. The command first attempts to fit the document to width, then applies magnification on subsequent taps.

Declaration

cs-api-definition
public override void Execute(object parameter)

Parameters

parameter

object

The Point representing the location where the double-tap occurred.

Overrides PdfViewerCommand.Execute(object)