WebShare

Wisej.NET's WebShare extension is an integration for the Web Share API available in most browsers.

Example Code

var canShare = WebShare.CanShare();
//canShare is a Task<Object> with several properties:
//AsyncState, CancellationPending, CreationOptions, Exception, Id, Result, Status

if (canShare.Exception == null)
{
    string title = "MDN";
    string text = "Learn web development on MDN!";
    string url = "https://developer.mozilla.org";
    WebShare.ShareAsync(url, text, title);
}

This is the result of the example code:

How to use

The WebShare extension can be added to a Wisej.NET project using NuGetPackage Manager.

Last updated