/// <inheritdoc/> protected internal override void OnPointerPressed(PointerPressedEventArgs e) { if (!e.Handled && LinkIsClickable(e.KeyModifiers)) { var eventArgs = new OpenUriRoutedEventArgs(NavigateUri) { RoutedEvent = OpenUriEvent }; e.Source.RaiseEvent(eventArgs); e.Handled = true; } }
private static void ExecuteOpenUriEventHandler(Window window, OpenUriRoutedEventArgs arg) { var url = arg.Uri.ToString(); try { Process.Start(new ProcessStartInfo { FileName = url, UseShellExecute = true }); } catch (Exception) { // Process.Start can throw several errors (not all of them documented), // just ignore all of them. } }