Ejemplo n.º 1
0
        //private RelayCommand _dropCommand;

        public TaggedViewModel(ITag tag, IContentController contentController, ITagRearranger tagRearranger)
        {
            _tag = tag;
            _contentController = contentController;
            _tagRearranger     = tagRearranger;

            ContextMenu = new ContextMenu();
            ContextMenu.Items.Add(new MenuItem()
            {
                Header  = "Add " + Name,
                Command = CreateCommand
            });

            GetInfo();

            /*foreach (var video in _tag.Videos)
             * {
             *  _tagLeaves.Add(new TagVideoViewModel(video, _tag, _videoController, _playlistController, _tagRearranger));
             * }
             *
             * Children = new ReadOnlyCollection<TagVideoViewModel>(_tagLeaves);*/
        }
Ejemplo n.º 2
0
        public static TagCategoryViewModel CreateForUncategorized(IContentController contentController, ITagRearranger tagRearranger)
        {
            var viewModel = new TagCategoryViewModel("Uncategorized")
            {
                _tagRearranger = tagRearranger
            };

            foreach (var tag in TagManager.Instance.UncategorizedTags)
            {
                viewModel._tags.Add(new TaggedViewModel(tag, contentController, tagRearranger));
            }

            viewModel.Children = new ReadOnlyCollection <TaggedViewModel>(viewModel._tags);

            return(viewModel);
        }