Created
March 1, 2012 02:43
-
-
Save jsonw23/1946837 to your computer and use it in GitHub Desktop.
Folder Tree WPF Control: Part 2 - Folder Selection Model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace GeekJ.FolderTreeControl | |
{ | |
public partial class FolderTree : UserControl | |
{ | |
private FolderTreeSelection _selection = new FolderTreeSelection(); | |
public FolderTreeSelection Selection | |
{ | |
get { return _selection; } | |
set | |
{ | |
_selection = value; | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace GeekJ.FolderTreeControl.Model | |
{ | |
public class FolderTreeSelection | |
{ | |
private List<Item> items = new List<Item>(); | |
public FolderTreeSelection() { } | |
public void Add(FolderTreeItem folderTreeItem, bool include = true) | |
{ | |
items.Add(new Item() { TreeItem = folderTreeItem, Include = include}); | |
} | |
public class Item | |
{ | |
public FolderTreeItem TreeItem { get; set; } | |
public bool Include { get; set; } | |
public Item() { } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment