Skip to content

Commit

Permalink
Attempt to get context menu entries to open URL
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitz committed Jul 6, 2021
1 parent 907cfa6 commit 2aa8f6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions UI/VisualizerDataControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ private void HelpContextMenu_Loaded(object sender, RoutedEventArgs e) {
}

var mi = new MenuItem() {
Header = header
Header = header,
DataContext = url
};
mi.Click += (s1, e1) => Process.Start(url);
mi.Click += static (s1,e1) => Process.Start((string)((MenuItem)s1).DataContext);
menu.Items.Add(mi);
}

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

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


}
}

0 comments on commit 2aa8f6e

Please sign in to comment.