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