mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-02-16 11:08:30 -05:00
Fix Process.Start for .Net Core
This commit is contained in:
@@ -117,7 +117,13 @@ namespace NotifyIconWpf.Sample.ShowCases
|
|||||||
|
|
||||||
private void OnNavigationRequest(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
private void OnNavigationRequest(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start(e.Uri.ToString());
|
Process.Start(new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = e.Uri.ToString(),
|
||||||
|
// UseShellExecute is default to false on .NET Core while true on .NET Framework.
|
||||||
|
// Only this value is set to true, the url link can be opened.
|
||||||
|
UseShellExecute = true
|
||||||
|
});
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,13 @@ namespace NotifyIconWpf.Sample.ShowCases.Showcase
|
|||||||
|
|
||||||
private void OnNavigationRequest(object sender, RequestNavigateEventArgs e)
|
private void OnNavigationRequest(object sender, RequestNavigateEventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start(e.Uri.ToString());
|
Process.Start(new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = e.Uri.ToString(),
|
||||||
|
// UseShellExecute is default to false on .NET Core while true on .NET Framework.
|
||||||
|
// Only this value is set to true, the url link can be opened.
|
||||||
|
UseShellExecute = true
|
||||||
|
});
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user