public MissionSearchContentLibraryItemViewModel(MissionLibraryViewModel library) : base(library) {
            MissionContextMenu = new MissionContextMenu(library);
            MissionFolderContextMenu = new MissionFolderContextMenu(library);

            MissionBarMenu = new MissionContextMenu(library);
            MissionFolderBarMenu = new MissionFolderContextMenu(library);

            SetupMenus(HandleSingleMenu, x => ContextMenu = null);
        }
        public MissionSearchContentLibraryItemViewModel(MissionLibraryViewModel library) : base(library)
        {
            MissionContextMenu       = new MissionContextMenu(library);
            MissionFolderContextMenu = new MissionFolderContextMenu(library);

            MissionBarMenu       = new MissionContextMenu(library);
            MissionFolderBarMenu = new MissionFolderContextMenu(library);

            SetupMenus(HandleSingleMenu, x => ContextMenu = null);
        }
        public MissionContentLibraryItemViewModel(MissionLibraryViewModel library, T model, string icon = null,
                                                  MissionLibraryGroupViewModel @group = null, bool isFeatured = false,
                                                  bool doGrouping = false)
            : base(library, model, icon, @group, isFeatured, doGrouping)
        {
            MissionContextMenu       = new MissionContextMenu(library);
            MissionFolderContextMenu = new MissionFolderContextMenu(library);
            MissionBarMenu           = new MissionContextMenu(library);
            MissionFolderBarMenu     = new MissionFolderContextMenu(library);

            SetupMenus(HandleSingleMenu, x => ContextMenu = null);
        }
        void HandleSingleMenu(IContent first)
        {
            var folder = first as MissionFolder;

            if (folder != null)
            {
                MissionFolderContextMenu.ShowForItem(folder);
                MissionFolderBarMenu.ShowForItem(folder);
                ContextMenu = MissionFolderContextMenu;
                BarMenu     = MissionFolderBarMenu;
            }
            else
            {
                var mission = first as Mission;
                if (mission != null)
                {
                    MissionContextMenu.ShowForItem(mission);
                    MissionBarMenu.ShowForItem(mission);
                }
                BarMenu     = MissionBarMenu;
                ContextMenu = MissionContextMenu;
            }
        }