public string[] GetBookmarkItemPaths() { var query = from item in TreeViewItemViewModel.FamilyTree(this.BookmarkCategory) select TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item, this.IsCategory); return(query.ToArray()); }
public string[] GetBookmarkCategoryPaths() { var query = from item in TreeViewItemViewModel.FamilyTree(this.BookmarkCategory) where item is BookmarkRootTreeViewItemViewModel || item is BookmarkCategoryTreeViewItemViewModel select TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item); return(query.ToArray()); }
internal void UpdateBookmarkItems() { var query = from item in TreeViewItemViewModel.Descendants(this.bookmarkCategory) select TreeViewItemViewModel.BuildRelativePath(this.bookmarkCategory, item, IsCategory); this.BookmarkItems = query.ToArray(); bool IsCategory(TreeViewItemViewModel viewModel) { return(viewModel is BookmarkRootTreeViewItemViewModel || viewModel is BookmarkCategoryTreeViewItemViewModel); } }
public TreeViewItemViewModel GetBookmarkItem(string path) { var items = TreeViewItemViewModel.FamilyTree(this.BookmarkCategory); foreach (var item in items) { var itemmPath = TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item); if (path == itemmPath) { return(item); } } return(null); }
internal void UpdateBookmarkItems() { var query = from item in TreeViewItemViewModel.Descendants(this.BookmarkCategory) select TreeViewItemViewModel.BuildRelativePath(this.BookmarkCategory, item, IsCategory); this.BookmarkItems = query.ToArray();