private void DisplayFieldsClick(object sender, RoutedEventArgs e) { var model = (TimelineModel)DataContext; var displayFields = DisplayFieldsForm.ShowAndGetResult(model.Service, model.DisplayFields, GetOwnerWindow()); if (displayFields != null) { model.SetDisplayFields(displayFields); } }
private void MenuItem_Click(object sender, RoutedEventArgs e) { var model = (DataModel)DataContext; var service = new DataService(); var displayFields = DisplayFieldsForm.ShowAndGetResult(service, model.DisplayFields, this); if (displayFields != null) { model.DisplayFields = displayFields; model.Items = GetData(++_offset, model.DisplayFields); } }