Interface IDesktopShell
- Namespace
- VpnHood.AppUi.Hosting.Desktop.Abstractions
- Assembly
- VpnHood.AppUi.Hosting.Desktop.Abstractions.dll
Defines what the UI asks of the system outside its window, where the UI framework's own way, or the host's, is refused.
public interface IDesktopShell
Remarks
It serves where the platform keeps an app from those ways, as for the Store edition. A host with no shell leaves the framework's and the host's own ways (Shell).
Methods
CopyText(string)
Puts text on the clipboard, for the person to paste elsewhere.
void CopyText(string text)
Parameters
textstringThe text.
OpenLink(Uri, CancellationToken)
Opens a link with the application the system associates with it: a web link in the person's browser.
Task<bool> OpenLink(Uri url, CancellationToken cancellationToken)
Parameters
urlUriThe link.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- Task<bool>
A task whose result is true where the link opened, or false where the system would not open it, and the UI offers it another way.
Exceptions
- OperationCanceledException
cancellationTokenwas canceled.
ShowConnectionBadge(DesktopConnectionBadge?)
Shows the connection's state on the app's taskbar button, in the system's own badge.
void ShowConnectionBadge(DesktopConnectionBadge? badge)
Parameters
badgeDesktopConnectionBadge?The state, or null to take the badge away, as the UI ends.