private void SetColumnBinding(GridColumn masterCol, GridColumn detailCol) { DependencyPropertyDescriptor.FromProperty(GridColumn.VisibleProperty, typeof(GridColumn)).AddValueChanged(masterCol, OnMasterColumnVisibleChanged); DependencyPropertyDescriptor.FromProperty(GridColumn.VisibleProperty, typeof(GridColumn)).AddValueChanged(detailCol, OnDetailColumnVisibleChanged); detailCol.AllowResizing = DefaultBoolean.False; if (detailCol.VisibleIndex == 0) { detailCol.SetBinding(GridColumn.WidthProperty, new Binding("ActualDataWidth") { Source = masterCol, Converter = widthAdjustmentConverter, ConverterParameter = widthAdjustmentValue }); } else { detailCol.SetBinding(GridColumn.WidthProperty, new Binding("ActualDataWidth") { Source = masterCol }); } masterColumns[masterCol.VisibleIndex] = masterCol; detailColumns[detailCol.VisibleIndex] = detailCol; }