private void objDatagrid_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e) { e.NewItem = new Guideline() { Name = "", TestCases = new ObservableCollection <TestCase>() }; }
private void dataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { var newItem = new BodyEntry(); newItem.Parent = body.bodyList; var be = body.bodyList.Liste.LastOrDefault<BodyEntry>(); if (be != null) { newItem.Bauch = be.Bauch; newItem.BizepsAngespannt = be.BizepsAngespannt; newItem.BizepsLocker = be.BizepsLocker; newItem.Bonus = be.Bonus; newItem.Brust = be.Brust; newItem.Gewicht = be.Gewicht; newItem.Hals = be.Hals; newItem.Oberschenkel = be.Oberschenkel; newItem.Schultern = be.Schultern; newItem.Wade = be.Wade; e.NewItem = newItem; } else { newItem.Bauch = 0; newItem.BizepsAngespannt = 0; newItem.BizepsLocker = 0; newItem.Bonus = 0; newItem.Brust = 0; newItem.Gewicht = 0; newItem.Hals = 0; newItem.Oberschenkel = 0; newItem.Schultern = 0; newItem.Wade = 0; e.NewItem = newItem; } }
private void RecomputePrice(object sender, System.Windows.Controls.AddingNewItemEventArgs e) { float _price = 0; foreach (BaseCar car in CarManager.Instance.carListOrdered) { _price += car.Цена; } label_price.Content = _price + " $"; }
private void grdMain_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e) { try { e.NewItem = new ParameterData { SystemDefault = false }; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void DataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { try { if (ConsoleDataGrid.Items.Count > 0) { var border = VisualTreeHelper.GetChild(ConsoleDataGrid, 0) as Decorator; if (border != null) { var scroll = border.Child as ScrollViewer; if (scroll != null) scroll.ScrollToEnd(); } } }catch(ArgumentOutOfRangeException) { //consume naively } }
/// <summary> /// A method that is called before a new item is created so that /// overrides can participate in the construction of the new item. /// </summary> /// <remarks> /// The default implementation raises the AddingNewItem event. /// </remarks> /// <param name="e">Event arguments that provide access to the new item.</param> protected virtual void OnAddingNewItem(AddingNewItemEventArgs e) { if (AddingNewItem != null) { AddingNewItem(this, e); } }
private void DataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { mIsAdd = true; }
private void dataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { dataGrid.Items.Refresh(); }
private void dgvProjects_AddingNewItem(object sender, AddingNewItemEventArgs e) { RefreshInternal(); CheckAllTests(); }
void Datagrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { var settings = new SettingsEntry(this); settings.Type = typeof(string); var vm = new SettingsVM(settings); e.NewItem = vm; }
private void datagridFilm_AddingNewItem(object sender, AddingNewItemEventArgs e) { }
private void MainDataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { MainDataGrid.UpdateLayout(); MainDataGrid.UpdateDefaultStyle(); MainDataGrid.Items.Refresh(); }
public void OnAddingNewWorkItem(object sender, AddingNewItemEventArgs e) { e.NewItem = new WorkItemVM(); }
private void PatternsGridOnAddingNewItem(object sender, AddingNewItemEventArgs addingNewItemEventArgs) { }
private void GrdCountries_OnAddingNewItem(object sender, AddingNewItemEventArgs e) { isInsertMode = true; }
private void Datagridconfiguration_AddingNewItem(object sender, AddingNewItemEventArgs e) { MessageBox.Show("Hallo"); }
private object AddNewItem() { Debug.Assert(CanUserAddRows, "AddNewItem called when the end-user cannot add new rows."); Debug.Assert(!IsAddingNewItem, "AddNewItem called when a pending add is taking place."); // Hide the placeholder UpdateNewItemPlaceholder(/* isAddingNewItem = */ true); // Create the new item (with app's help, or not) object newItem = null; IEditableCollectionViewAddNewItem ani = (IEditableCollectionViewAddNewItem)Items; if (ani.CanAddNewItem) { AddingNewItemEventArgs e = new AddingNewItemEventArgs(); OnAddingNewItem(e); newItem = e.NewItem; } newItem = (newItem != null) ? ani.AddNewItem(newItem) : EditableItems.AddNew(); // initialize the new item if (newItem != null) { OnInitializingNewItem(new InitializingNewItemEventArgs(newItem)); } // CancelEdit and CommitEdit rely on IsAddingNewItem CommandManager.InvalidateRequerySuggested(); return newItem; }
private void GridOnAddingNewItem(object sender, AddingNewItemEventArgs addingNewItemEventArgs) { addingNewItemEventArgs.NewItem = Factory.Create(); }
private void DataGridAddingNewItemExecute(AddingNewItemEventArgs e) { }
private void playersDataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) { }