protected internal override void INTERNAL_OnAttachedToVisualTree() { // we need the TileView to be set before calling OnChildrenReset, // which is done in the base implementation. this._owner = ItemsControl.GetItemsOwner(this) as TileView; if (this._contentGrid == null) { var grid = new GridNotLogical(); var column1 = new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }; var column2 = new ColumnDefinition(); grid.ColumnDefinitions.Add(column1); grid.ColumnDefinitions.Add(column2); this._contentGrid = grid; } BindingOperations.SetBinding( this._contentGrid.ColumnDefinitions[1], ColumnDefinition.WidthProperty, new Binding("MinimizedColumnWidth") { Source = this._owner }); base.INTERNAL_OnAttachedToVisualTree(); INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(this._contentGrid, this, 0); }
protected internal override void INTERNAL_OnDetachedFromVisualTree() { base.INTERNAL_OnDetachedFromVisualTree(); this._owner = null; this._contentGrid = null; }
DependencyProperty.RegisterAttached("Dock", typeof(Dock), typeof(DockPanel), new PropertyMetadata(Dock.Left)); //this is the likely default value since Dock.Left is 0. internal protected override void INTERNAL_OnAttachedToVisualTree() { if (_grid == null) { _grid = new GridNotLogical(); MakeUIStructure(); } base.INTERNAL_OnAttachedToVisualTree(); }
DependencyProperty.RegisterAttached("Dock", typeof(Dock), typeof(DockPanel), new PropertyMetadata(Dock.Left)); //this is the likely default value since Dock.Left is 0. internal protected override void INTERNAL_OnAttachedToVisualTree() { if (_grid == null) { _grid = new GridNotLogical(); } AddVisualChild(_grid); base.INTERNAL_OnAttachedToVisualTree(); }