Added HyperlinkEntry

This commit is contained in:
TheXamlGuy
2024-06-10 20:28:22 +01:00
parent fb39932847
commit f443b4bdd1
19 changed files with 171 additions and 35 deletions
+25
View File
@@ -0,0 +1,25 @@
using System.Diagnostics;
using Toolkit.Foundation;
namespace Wallet;
public class HyperlinkHandler :
INotificationHandler<CreateEventArgs<Hyperlink>>
{
public Task Handle(CreateEventArgs<Hyperlink> args)
{
if (args.Sender is Hyperlink hyperlink && hyperlink.Value is { Length: > 0 } value)
{
try
{
Process.Start(new ProcessStartInfo { FileName = value, UseShellExecute = true });
}
catch
{
}
}
return Task.CompletedTask;
}
}