public void LoadRecentCommands() { var recent_taxonomy = CommandContainer.Where(i => i.ID == "R_Tax").FirstOrDefault(); var recent_instance = CommandContainer.Where(i => i.ID == "R_Inst").FirstOrDefault(); recent_instance.Children.Clear(); foreach (var item in RecentInstances) { var m = new MenuCommand(item, item, (o) => { OpenInstance(item); }, null); recent_instance.Children.Add(m); } recent_taxonomy.Children.Clear(); foreach (var item in RecentTaxonomies) { var m = new MenuCommand(item, Utilities.Strings.GetFileName(item), (o) => { OpenTaxonomy(item); }, null); recent_taxonomy.Children.Add(m); } UI.LoadMenu(CommandContainer, null); }