Skip to content

Instantly share code, notes, and snippets.

@jsonw23
Created March 1, 2012 02:43
Show Gist options
  • Save jsonw23/1946837 to your computer and use it in GitHub Desktop.
Save jsonw23/1946837 to your computer and use it in GitHub Desktop.
Folder Tree WPF Control: Part 2 - Folder Selection Model
namespace GeekJ.FolderTreeControl
{
public partial class FolderTree : UserControl
{
private FolderTreeSelection _selection = new FolderTreeSelection();
public FolderTreeSelection Selection
{
get { return _selection; }
set
{
_selection = value;
}
}
}
}
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