Skip to main content

IShareService Interface

Definition​

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

Platform-abstracted interface for sharing PDF documents.

public interface IShareService

Methods​

NameDescription
ShareAsyncShares the document using the system share dialog.
ShareFileAsyncShares a file using the system share dialog.

ShareAsync Method​

Shares the document using the system share dialog.

public System.Threading.Tasks.Task ShareAsync(Avalonia.Controls.Pdf.Core.IPdfDocument document, Avalonia.Controls.Pdf.Services.ShareOptions options, System.Threading.CancellationToken cancellationToken)

Parameters​

document Avalonia.Controls.Pdf.Core.IPdfDocument

The document to share.

options Avalonia.Controls.Pdf.Services.ShareOptions

Share options.

cancellationToken System.Threading.CancellationToken

Cancellation token.

Returns​

System.Threading.Tasks.Task

ShareFileAsync Method​

Shares a file using the system share dialog.

public System.Threading.Tasks.Task ShareFileAsync(string filePath, Avalonia.Controls.Pdf.Services.ShareOptions options, System.Threading.CancellationToken cancellationToken)

Parameters​

filePath string

Path to the file to share.

options Avalonia.Controls.Pdf.Services.ShareOptions

Share options.

cancellationToken System.Threading.CancellationToken

Cancellation token.

Returns​

System.Threading.Tasks.Task

Properties​

NameDescription
IsSupportedGets whether sharing is supported on the current platform.

IsSupported Property​

Gets whether sharing is supported on the current platform.

public bool IsSupported { get; set; }