private void Button_Click(object sender, RoutedEventArgs e) { var fldchoose = new FieldChooser(new FieldChooserModelView(ModelView.ItemType)); fldchoose.ShowDialog(); ModelView.RefreshColumns(fldchoose.FieldChooserModelView.AllFields); }
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue) { var fldchoose = new FieldChooser(new FieldChooserModelView(ModelView.ItemType)); ModelView.RefreshColumns(fldchoose.FieldChooserModelView.AllFields); ItemSourceChanged?.Invoke(oldValue, newValue); }