Skip to main content

PdfShareRequestedEventArgs Class

Definition

Assembly:Avalonia.Controls.PdfViewer
Package:Avalonia.Controls.PdfViewer

Raised before the viewer shares. Set Avalonia.Controls.PdfShareRequestedEventArgs.Handled to take over sharing in the application; the built-in platform share service is then skipped.

public class PdfShareRequestedEventArgs

Inheritance: EventArgs -> PdfShareRequestedEventArgs

Methods

NameDescription
GetDocumentBytesAsyncExports the document, including unsaved annotation edits, as PDF bytes.

GetDocumentBytesAsync Method

Exports the document, including unsaved annotation edits, as PDF bytes.

public System.Threading.Tasks.Task<byte[]> GetDocumentBytesAsync(System.Threading.CancellationToken cancellationToken)

Parameters

cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<byte[]>

Properties

NameDescription
DocumentThe loaded document.
HandledSet to true when the application has handled the request itself.
OptionsShare options; the viewer pre-fills Avalonia.Controls.Pdf.Services.ShareOptions.Title, Avalonia.Controls.Pdf.Services.ShareOptions.Owner and Avalonia.Controls.Pdf.Services.ShareOptions.Anchor.

Document Property

The loaded document.

public Avalonia.Controls.Pdf.Core.IPdfDocument Document { get; set; }

Handled Property

Set to true when the application has handled the request itself.

public bool Handled { get; set; }

Options Property

Share options; the viewer pre-fills Avalonia.Controls.Pdf.Services.ShareOptions.Title, Avalonia.Controls.Pdf.Services.ShareOptions.Owner and Avalonia.Controls.Pdf.Services.ShareOptions.Anchor.

public Avalonia.Controls.Pdf.Services.ShareOptions Options { get; set; }