Esempio n. 1
0
        protected virtual void applyBindingExpression(
            BindingExpression be,
            ViewFactory factory,
            Dictionary<string, string> parameters)
        {
            if (parameters.ContainsKey("Converter")) be.Converter = factory.GetBindingConverter(parameters["Converter"]);
            if (parameters.ContainsKey("ConverterParameter")) be.ConverterParameter = parameters["ConverterParameter"];

            factory.CreateBinding(be);
        }
Esempio n. 2
0
        protected override void applyBindingExpression(
            BindingExpression be,
            ViewFactory factory,
            Dictionary<string, string> parameters)
        {
            base.applyBindingExpression(be, factory, parameters);

            // update UpdateTarget immediately in applyMapping call
            be.UpdateTarget(EventArgs.Empty);
        }
Esempio n. 3
0
 private void TargetPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     foreach (BindingExpression be in Expressions)
     {
         if (be.Target == sender && compareProperty(e.PropertyName, be.TargetProperty.Name))
         {
             if (_initialUpdateExpr == null)
             {
                 _initialUpdateExpr = be;
                 be.UpdateSource(e);
                 _initialUpdateExpr = null;
             }
             else if (_initialUpdateExpr != be)
             {
                 be.UpdateSource(e);
             }
         }
     }
 }
Esempio n. 4
0
        protected virtual BindingExpression createBindingExpression(
            EBingingMode mode,
            object source,
            PropertyInfo sourceProperty,
            object target,
            PropertyInfo targetProperty)
        {
            if (sourceProperty == null) throw new ArgumentNullException("sourceProperty");
            if (targetProperty == null) throw new ArgumentNullException("targetProperty");

            var be = new BindingExpression(
                        mode,
                        source,
                        sourceProperty,
                        target,
                        targetProperty);

            return be;
        }
Esempio n. 5
0
 public virtual void CreateBinding(BindingExpression be)
 {
     _bindingEngine.Expressions.Add(be);
 }