示例#1
0
        /// <summary>Handles the PropertyChanged event of the DataContext control.</summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="PropertyChangedEventArgs"/> instance containing the event data.</param>
        private void DataContext_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case nameof(IAlphaSettings.AlphaValue):
                NumericAlphaValue.Value = DataContext.AlphaValue;
                ImageAlpha.Refresh();
                break;

            case nameof(IAlphaSettings.UpdateRange):
                NumericMinAlpha.Value = DataContext.UpdateRange.Minimum;
                NumericMaxAlpha.Value = DataContext.UpdateRange.Maximum;
                break;
            }

            ValidateOk();
        }