public void OnPropertyChanged(object sender, PropertyChangedEventArgs e) { // if property name is equal to text if (e.PropertyName == "Text") { InstanciateCell tCell = sender as InstanciateCell; DeleteDeps(tCell.Name); // update cell value to text //tCell.SetVal(tCell.Text); // if it starts with an equal sign if (tCell.Text != "" && tCell.Text[0] == '=' && tCell.Text.Length > 1) { ExpTree exp = new ExpTree(tCell.Text.Substring(1)); MakeDeps(tCell.Name, exp.getVars()); } EvalCell(sender as Cell); } else if (e.PropertyName == "BackColor") { CellPropertyChanged(sender, new PropertyChangedEventArgs("BackColor")); } }