private object nullItem = null; //in order to lazy load files and folders - Makes folders expandable #endregion Fields #region Methods public static TreeViewModel GetInstance() { if (instance == null) { instance = new TreeViewModel(); } return instance; }
/// <summary> /// Loads all documents and folders in the item collection to the tree view. /// </summary> /// <param name="items"></param> public void LoadFilesAndFolders(System.Windows.Controls.ItemCollection items) { TreeViewModel.GetInstance().LoadFilesAndFolders(items); }
/// <summary> /// Update the explorerview /// </summary> public void UpdateExplorerView() { TreeViewModel.GetInstance().LoadFilesAndFolders(gui.ExplorerTree.Items); }