protected virtual void OnInheritanceContextChanged(object sender, EventArgs e) { if (this.GridView != null) { this.GridView.Columns.CollectionChanged -= this.OnColumnsChanged; } this.GridView = InheritanceContextHelper.Get(this.GridViewColumn) as GridView; if (this.GridView != null) { this.GridView.Columns.CollectionChanged += this.OnColumnsChanged; } }
public PositionBehaviour(GridViewColumn gridViewColumn) { this.GridViewColumn = gridViewColumn; InheritanceContextHelper.AddEventHandler(gridViewColumn, this.OnInheritanceContextChanged); }
protected override void OnDisposing() { InheritanceContextHelper.RemoveEventHandler(this.GridViewColumn, this.OnInheritanceContextChanged); base.OnDisposing(); }