IShareService Interface
Definition
Platform-abstracted interface for sharing PDF documents.
public interface IShareService
Methods
| Name | Description |
|---|---|
| ShareAsync | Shares the document using the system share dialog. |
| ShareFileAsync | Shares 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
| Name | Description |
|---|---|
| IsSupported | Gets whether sharing is supported on the current platform. |
IsSupported Property
Gets whether sharing is supported on the current platform.
public bool IsSupported { get; set; }