Skip to content

Commit ec7deaf

Browse files
committed
Fix for context menu url navigation dotnet/runtime#28005
1 parent 2aa8f6e commit ec7deaf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

UI/VisualizerDataControl.xaml.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@ private void HelpContextMenu_Loaded(object sender, RoutedEventArgs e) {
8989
Header = header,
9090
DataContext = url
9191
};
92-
mi.Click += static (s1,e1) => Process.Start((string)((MenuItem)s1).DataContext);
92+
mi.Click += static (s1, e1) => {
93+
// we need to explicitly set UseShellExecute to true -- https://github.com/dotnet/runtime/issues/28005
94+
var psi = new ProcessStartInfo {
95+
FileName = (string)((MenuItem)s1).DataContext,
96+
UseShellExecute = true
97+
};
98+
Process.Start(psi);
99+
};
93100
menu.Items.Add(mi);
94101
}
95102

@@ -100,7 +107,5 @@ void addSeparator() {
100107
}
101108

102109
private const string baseUrl = "https://docs.microsoft.com/dotnet/api/";
103-
104-
105110
}
106111
}

0 commit comments

Comments
 (0)