public IEnumerable<TabblesApi.MenuItem> menuItems() { var l = new List<TabblesApi.MenuItem>(); var mi = new TabblesApi.MenuItem { Name = "Show", Tooltip = "Show the plugin window", // when the menu item is clicked... onItemClicked = () => { //... show the plugin main window. This must be done in the gui thread as WPF is not multithreaded. TabblesApi.API.ExecuteActionInGuiThread(() => { var wi = new MainWindow(); wi.Show(); }); } }; l.Add(mi); return l; }
public IEnumerable <TabblesApi.MenuItem> menuItems() { var l = new List <TabblesApi.MenuItem>(); var mi = new TabblesApi.MenuItem { Name = "Show", Tooltip = "Show the plugin window", // when the menu item is clicked... onItemClicked = () => { //... show the plugin main window. This must be done in the gui thread as WPF is not multithreaded. TabblesApi.API.ExecuteActionInGuiThread(() => { var wi = new MainWindow(); wi.Show(); }); } }; l.Add(mi); return(l); }