public ConvertingAdapter(IValueAdapter targetAdapter, IValueConverter converter) { if (converter == null) { throw new ArgumentNullException("converter"); } if (targetAdapter == null) { throw new ArgumentNullException("targetAdapter"); } _converter = converter; _targetAdapter = targetAdapter; _targetAdapter.ValueChangedCallback = OnSourceAdapterValueChanged; }
public ModelFormulaExpression( String name, TModel model, IModelFormula <TModel, TValue> formula, IValueAdapter <TValue> adapter, Func <ModelFormulaExpression <TModel, TValue>, CalculationTicket, IEnumerable <IValidationIssue> > validator ) { this.Name = name; this.Model = model; this.Formula = formula; this.Adapter = adapter; this.validator = validator; }
public ValueBinding(IValueAdapter targetAdapter, IValueAdapter sourceAdapter) { if (targetAdapter == null) { throw new ArgumentNullException("targetAdapter"); } if (sourceAdapter == null) { throw new ArgumentNullException("sourceAdapter"); } _targetAdapter = targetAdapter; _sourceAdapter = sourceAdapter; _targetAdapter.ValueChangedCallback = _sourceAdapter.SetValue; _sourceAdapter.ValueChangedCallback = ForwardValueToTargetIfNotNoValue; }
public DataContextPropertyAdapter(FrameworkElement target, string propertyInDataContext) { if (target == null) { throw new ArgumentNullException("target"); } if (propertyInDataContext == null) { throw new ArgumentNullException("propertyInDataContext"); } _propertyInDataContext = propertyInDataContext; _dataContextAdapter = ValueAdapterFactory.CreateAdapterForDependencyProperty(target, FrameworkElement.DataContextProperty); _dataContextAdapter.ValueChangedCallback = OnDataContextChanged; _valueChangedCallback = newValue => { }; _valueAdapter = CreateValueAdapter(); }
protected CollectionBindingBase( ICollectionAdapter targetAdapter, IValueAdapter sourceAdapter) { if (targetAdapter == null) { throw new ArgumentNullException("targetAdapter"); } if (sourceAdapter == null) { throw new ArgumentNullException("sourceAdapter"); } _targetAdapter = targetAdapter; _sourceAdapter = sourceAdapter; _sourceAdapter.ValueChangedCallback = OnSourceValueChangedCallback; _targetAdapter.CollectionChangedCallback = OnTargetCollectionChangedCallback; }
private static IValueAdapter ConvertSourceToType(IValueAdapter adapter, Type sourceTargetType) { return(new ConvertingAdapter(adapter, new SourceValueConverter(sourceTargetType))); }
public SynchronizationAdapter(IValueAdapter valueAdapter, SynchronizationGroup synchronizationGroup) { _valueAdapter = valueAdapter; _valueAdapter.ValueChangedCallback = OnValueAdapterValueChanged; _synchronizationGroup = synchronizationGroup; }
public void WriteValue <TValue>(string name, TValue value, IValueAdapter <TValue> adapter) { }
private void ClearValueAdapter() { Dispose(_valueAdapter); _valueAdapter = null; }
public ValueBindingBuilder SetTargetAdapter(IValueAdapter adapter) { _targetAdapter = adapter; return(this); }
private IValueAdapter DecorateTargetAdapter(IValueAdapter targetAdapter, DataGridColumn column, int columnIndex, DependencyProperty property) { return(TargetAdapterDecorator == null ? targetAdapter : TargetAdapterDecorator(targetAdapter, column, columnIndex, property)); }
public ListBinding( ICollectionAdapter targetAdapter, IValueAdapter sourceAdapter) : base(targetAdapter, sourceAdapter) { }
public void WriteValue <TValue>(String name, TValue value, IValueAdapter <TValue> adapter) { Trace.WriteLine(name + ": " + value); }