// Token: 0x06001C0C RID: 7180 RVA: 0x00083D38 File Offset: 0x00081F38
 internal override BindingExpressionBase CreateBindingExpressionOverride(DependencyObject target, DependencyProperty dp, BindingExpressionBase owner)
 {
     if (this.Converter == null && string.IsNullOrEmpty(base.StringFormat))
     {
         throw new InvalidOperationException(SR.Get("MultiBindingHasNoConverter"));
     }
     for (int i = 0; i < this.Bindings.Count; i++)
     {
         MultiBinding.CheckTrigger(this.Bindings[i]);
     }
     return(MultiBindingExpression.CreateBindingExpression(target, dp, this, owner));
 }
Esempio n. 2
0
        // Token: 0x06001C22 RID: 7202 RVA: 0x00083F80 File Offset: 0x00082180
        internal static MultiBindingExpression CreateBindingExpression(DependencyObject d, DependencyProperty dp, MultiBinding binding, BindingExpressionBase owner)
        {
            FrameworkPropertyMetadata frameworkPropertyMetadata = dp.GetMetadata(d.DependencyObjectType) as FrameworkPropertyMetadata;

            if ((frameworkPropertyMetadata != null && !frameworkPropertyMetadata.IsDataBindingAllowed) || dp.ReadOnly)
            {
                throw new ArgumentException(SR.Get("PropertyNotBindable", new object[]
                {
                    dp.Name
                }), "dp");
            }
            MultiBindingExpression multiBindingExpression = new MultiBindingExpression(binding, owner);

            multiBindingExpression.ResolvePropertyDefaultSettings(binding.Mode, binding.UpdateSourceTrigger, frameworkPropertyMetadata);
            return(multiBindingExpression);
        }
 private void Binding_TargetUpdated(object sender, DataTransferEventArgs e)
 {
     string txt = TestTextBox.Text;
     mbindingExpression =
         BindingOperations.GetMultiBindingExpression(e.TargetObject, e.Property);
     mbindingExpression.UpdateSource();
     
     foreach (var bind in mbindingExpression.BindingExpressions)
         bind.UpdateSource();
 }
Esempio n. 4
0
    //------------------------------------------------------
    //
    //  Internal Methods
    //
    //------------------------------------------------------

    // Create a new BindingExpression from the given Binding description
    internal static MultiBindingExpression CreateBindingExpression(DependencyObject d, DependencyProperty dp, MultiBinding binding, BindingExpressionBase owner)
    {
        FrameworkPropertyMetadata fwMetaData = dp.GetMetadata(d.DependencyObjectType) as FrameworkPropertyMetadata;

        if ((fwMetaData != null && !fwMetaData.IsDataBindingAllowed) || dp.ReadOnly)
            throw new ArgumentException(SR.Get(SRID.PropertyNotBindable, dp.Name), "dp");

        // create the BindingExpression
        MultiBindingExpression bindExpr = new MultiBindingExpression(binding, owner);

        bindExpr.ResolvePropertyDefaultSettings(binding.Mode, binding.UpdateSourceTrigger, fwMetaData);

        return bindExpr;
    }