protected BookmarkCategoryTreeViewItemViewModel(string path, SmartSetBrowserViewModel browser)
 {
     NameValidator.ValidateCategoryPath(path);
     this.categoryName = new CategoryName(path);
     this.Target       = path;
     this.Owner        = browser;
 }
        public SmartSetCategoryTreeViewItemViewModel(ISmartSetCategory category, SmartSetBrowserViewModel browser)
        {
            this.category = category;
            this.browser  = browser;
            this.Target   = category;

            foreach (var item in category.Categories)
            {
                this.AddViewModel(item);
            }

            foreach (var item in category.Items)
            {
                this.AddViewModel(item);
            }

            this.category.Renamed += Category_Renamed;
            this.category.Items.CollectionChanged      += Category_ItemsChanged;
            this.category.Categories.CollectionChanged += Category_CategoriesChanged;
        }
Example #3
0
 public SmartSetContextTreeViewItemViewModel(ISmartSetCategory category, SmartSetBrowserViewModel browser)
     : base(category, browser)
 {
 }
Example #4
0
 public abstract BookmarkCategoryTreeViewItemViewModel CreateInstance(string path, SmartSetBrowserViewModel browser);
Example #5
0
 protected BookmarkRootTreeViewItemViewModel(SmartSetBrowserViewModel browser)
 {
     this.Owner = browser ?? throw new ArgumentNullException(nameof(browser));
 }