Skip to content

Commit

Permalink
Fix for context menu url navigation dotnet/runtime#28005
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitz committed Jul 6, 2021
1 parent 2aa8f6e commit ec7deaf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions UI/VisualizerDataControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ private void HelpContextMenu_Loaded(object sender, RoutedEventArgs e) {
Header = header,
DataContext = url
};
mi.Click += static (s1,e1) => Process.Start((string)((MenuItem)s1).DataContext);
mi.Click += static (s1, e1) => {
// we need to explicitly set UseShellExecute to true -- https://github.com/dotnet/runtime/issues/28005
var psi = new ProcessStartInfo {
FileName = (string)((MenuItem)s1).DataContext,
UseShellExecute = true
};
Process.Start(psi);
};
menu.Items.Add(mi);
}

Expand All @@ -100,7 +107,5 @@ void addSeparator() {
}

private const string baseUrl = "https://docs.microsoft.com/dotnet/api/";


}
}

0 comments on commit ec7deaf

Please sign in to comment.