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(); } } } } } }
public void UpdateNow() { using (NotificationGate.BeginOutbound()) { _depProperty.OnGet(); } }
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(); }
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; } } }