private void UpdateTextBox(object sender, DataContextChangedEventArgs e) { if (this.dataContext.Value != null) { this.BackColor = (Color)this.dataContext.Value; } }
private void UpdateLabel(object sender, DataContextChangedEventArgs e) { this.label.Text = string.Format(CultureInfo.InvariantCulture, "{0}", e.NewValue); }
private void UpdateTextBox(object sender, DataContextChangedEventArgs e) { if (this.suppressValueChangeEvent) { return; } if (this.dataContext.Value != null) { this.suppressValueChangeEvent = true; try { this.comboBox.SelectedItem = this.dataContext.Value; } finally { this.suppressValueChangeEvent = false; } } }
private void ResetModel(object sender, DataContextChangedEventArgs e) { this.ResetModelBox(); }