public TreeGridRow(TreeGrid treeGrid, bool isHeaderRow) { this.treeGrid = treeGrid; this.IsHeaderRow = isHeaderRow; SetBinding(Canvas.LeftProperty, new Binding { Source = treeGrid, Path = new PropertyPath(TreeGrid.HorizontalOffsetProperty), Converter = new NegatingConverter() }); SetBinding(GridHasKeyboardFocusProperty, new Binding { Source = treeGrid, Path = new PropertyPath(TreeGrid.IsKeyboardFocusWithinProperty) }); this.MouseDown += OnMouseDown; }
internal RootTreeGridNode(TreeGrid owner) { this.owner = owner; // The root node should always have a non-null items collection. this.items = emptyItems; }
void InvalidateChildren(TreeGrid owner) { if (this.childNodes != null) { foreach (var child in this.childNodes.Values) { child.Invalidate(owner); } } this.childNodes = null; }
public static TreeGridNode CreateRootNode(TreeGrid owner) { // Note that the root node is always expanded... return new RootTreeGridNode(owner) { childIndex = 0, IsExpanded = true, level = 0 }; }
void Invalidate(TreeGrid owner) { InvalidateChildren(owner); StopObservingItems(); this.childIndex = -1; owner.OnNodeInvalidated(new Reference(this)); }
public SelectionChangeSuppressor(TreeGrid grid) { this.grid = grid; this.previous = grid.changeSuppressor; this.changed = false; grid.changeSuppressor = this; }