Ejemplo n.º 1
0
        /// <summary>
        /// Creates a BindingSlave for each Binding and binds the Value
        /// accordingly.
        /// </summary>
        internal void Initialize()
        {
            Children.Clear();

            if (Bindings != null)
            {
                foreach (Binding binding in Bindings.OfType <Binding>())
                {
                    BindingSlave slave = new BindingSlave();
                    slave.SetBinding(BindingSlave.ValueProperty, binding);
                    slave.PropertyChanged += OnSlaveValueChanged;
                    Children.Add(slave);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a BindingSlave for each Binding and binds the Value
        /// accordingly.
        /// </summary>
        internal void Initialize()
        {
            Children.Clear();

              if (Bindings != null)
              {
            foreach (Binding binding in Bindings.OfType<Binding>())
            {
              BindingSlave slave = new BindingSlave();
              slave.SetBinding(BindingSlave.ValueProperty, binding);
              slave.PropertyChanged += OnSlaveValueChanged;
              Children.Add(slave);
            }
              }
        }
Ejemplo n.º 3
0
        private static void OnValueChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
        {
            BindingSlave slave = (BindingSlave)dependencyObject;

            slave.OnPropertyChanged("Value");
        }