public void Initialize(DataGrid control) { control.Width = 500; control.Height = 200; control.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; behavior = new DataGridFillerColumn{ColumnIndex = 1}; Behaviors.SetDataGridFillerColumn(control, behavior); viewModel = new ViewModel(); viewModel.Load(5); control.ItemsSource = viewModel.Items; }
public static void SetDataGridFillerColumn(DataGrid element, DataGridFillerColumn value) { element.SetValue(DataGridFillerColumnProperty, value); }