Beispiel #1
0
		private void UpdateTextBox(object sender, DataContextChangedEventArgs e)
		{
			if (this.dataContext.Value != null)
			{
				this.BackColor = (Color)this.dataContext.Value;
			}
		}
Beispiel #2
0
		private void UpdateLabel(object sender, DataContextChangedEventArgs e)
		{
			this.label.Text = string.Format(CultureInfo.InvariantCulture, "{0}", e.NewValue);
		}
Beispiel #3
0
		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;
				}
			}
		}
Beispiel #4
0
		private void ResetModel(object sender, DataContextChangedEventArgs e)
		{
			this.ResetModelBox();
		}