public void RaiseValueChanged(ValueChangedEventArgs args = null)
 {
     if (args == null)
         args = ValueChangedEventArgs.FalseEventArgs;
     var handler = ValueChanged;
     if (handler != null) handler(this, args);
 }
 private void OneTimeSourceHandler(IObserver sender, ValueChangedEventArgs args)
 {
     IDataBinding binding = Binding;
     if (binding != null && binding.TargetAccessor.IsAllMembersAvailable() && binding.SourceAccessor.IsAllMembersAvailable(true))
     {
         UnsubscribeSources(OneTimeSourceHandler);
         binding.UpdateSource();
     }
 }
 private void OneTimeTargetHandler(IObserver sender, ValueChangedEventArgs args)
 {
     IDataBinding binding = Binding;
     if (binding != null && binding.TargetAccessor.IsAllMembersAvailable() && binding.SourceAccessor.IsAllMembersAvailable())
     {
         binding.TargetAccessor.Source.ValueChanged -= OneTimeTargetHandler;
         binding.UpdateTarget();
     }
 }
 private void OneTimeHandler(IObserver sender, ValueChangedEventArgs args)
 {
     IDataBinding binding = Binding;
     if (binding == null || !binding.TargetAccessor.IsAllMembersAvailable() || !binding.SourceAccessor.IsAllMembersAvailable(true))
         return;
     EventHandler<IObserver, ValueChangedEventArgs> handler = OneTimeHandler;
     UnsubscribeSources(handler);
     binding.TargetAccessor.Source.ValueChanged -= handler;
     binding.UpdateTarget();
     if (_disposeBinding)
         binding.Dispose();
 }
Пример #5
0
 /// <summary>
 ///     Updates the source binding when target value changed.
 /// </summary>
 private void TargetOnValueChanged(IBindingSource sender, ValueChangedEventArgs args)
 {
     Binding.UpdateSource();
 }
 private void OnDataContextChanged(ValueChangedEventArgs message)
 {
     _isInvoked = true;
     var handler = ValueChanged;
     if (handler != null)
         handler(this, message);
 }
 private void ObserverOnValueChanged(IObserver sender, ValueChangedEventArgs args)
 {
     OnDataContextChanged(args);
 }
 private void OnDataContextChanged(ValueChangedEventArgs message)
 {
     _isInvoked = true;
     ValueChanged?.Invoke(this, message);
 }
 static ValueChangedEventArgs()
 {
     TrueEventArgs = new ValueChangedEventArgs(true);
     FalseEventArgs = new ValueChangedEventArgs(false);
 }
 private void OnBindingSourceValueChanged(IObserver sender, ValueChangedEventArgs args)
 {
     if (args.LastMemberChanged && !sender.Path.IsEmpty)
         return;
     UpdateSources(false);
     UpdateErrors(null);
 }
Пример #11
0
 public void RaiseValueChanged(ValueChangedEventArgs args = null)
 {
     if (args == null)
         args = ValueChangedEventArgs.FalseEventArgs;
     IHandler<ValueChangedEventArgs> handler = Listener;
     if (handler != null) handler.Handle(this, args);
 }
Пример #12
0
 private void SourceOnValueChanged(IObserver sender, ValueChangedEventArgs args)
 {
     Binding.UpdateTarget();
 }