Ejemplo n.º 1
0
        public override void OnUserInput(object value)
        {
            if (NotificationGate.IsInbound)
            {
                var scheduler = UpdateScheduler.Begin();

                try
                {
                    value = TranslateIncommingValue(value);
                    ClassProperty.SetObjectValue(ObjectInstance.WrappedObject, value);
                }
                finally
                {
                    if (scheduler != null)
                    {
                        using (NotificationGate.BeginOutbound())
                        {
                            foreach (IUpdatable updatable in scheduler.End())
                            {
                                updatable.UpdateNow();
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void UpdateNow()
 {
     using (NotificationGate.BeginOutbound())
     {
         _depProperty.OnGet();
     }
 }
Ejemplo n.º 3
0
 public override void Dispose()
 {
     foreach (IObjectInstance child in _children)
     {
         ObjectInstance.Tree.RemoveKey(child.WrappedObject);
         child.Dispose();
     }
     using (NotificationGate.BeginOutbound())
     {
         ObjectInstance.ClearValue(ClassProperty.DependencyProperty);
     }
     _depCollection.Dispose();
 }
Ejemplo n.º 4
0
 private void UpdateNow()
 {
     using (NotificationGate.BeginOutbound())
     {
         _depCollection.OnGet();
         if (_delay != null)
         {
             // Update the observable collection outside of the update method
             // so we don't take a dependency on item template properties.
             _delay();
             _delay = null;
         }
     }
 }