public static void Add(string FileName, RecentItemType Type) { var I = new RecentItem(FileName); if (Type == RecentItemType.Image) I.PrintButton.Visibility = Visibility.Visible; I.Remove += () => _RecentList.Remove(I); _RecentList.Add(I); }
public static void Add(string FileName, RecentItemType Type) { var I = new RecentItem(FileName); if (Type == RecentItemType.Image) { I.PrintButton.Visibility = Visibility.Visible; } I.Remove += () => _RecentList.Remove(I); _RecentList.Add(I); }
public void Add(string FileName, RecentItemType Type) { var I = new RecentItem(FileName); // Show Print Command for Images if (Type == RecentItemType.Image) { I.PrintButton.Visibility = Visibility.Visible; } I.Remove += () => RecentList.Remove(I); // Insert on top RecentList.Insert(0, I); // Refresh the Enabled state of RecentItems CommandManager.InvalidateRequerySuggested(); }