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