public override bool TryGetValue(out object value) { if (_currentChildBinding == null) { value = null; return(false); } return(_currentChildBinding.TryGetValue(out value)); }
private void CreateSourceBinding(object source) { _dataContext = source; _sourceBinding = SourceBindingFactory.CreateBinding(source, _bindingDescription.SourcePropertyPath); if (NeedToObserveSourceChanges) _sourceBinding.Changed += (sender, args) => UpdateTargetFromSource(args.IsAvailable, args.Value); if (NeedToUpdateTargetOnBind) { // note that we expect Bind to be called on the UI thread - so no need to use RunOnUIThread here object currentValue; bool currentIsAvailable = _sourceBinding.TryGetValue(out currentValue); UpdateTargetFromSource(currentIsAvailable, currentValue); } }
private void CreateSourceBinding(object source) { _dataContext = source; _sourceBinding = SourceBindingFactory.CreateBinding(source, _bindingDescription.SourcePropertyPath); if (NeedToObserveSourceChanges) { _sourceBinding.Changed += (sender, args) => UpdateTargetFromSource(args.IsAvailable, args.Value); } if (NeedToUpdateTargetOnBind) { // note that we expect Bind to be called on the UI thread - so no need to use RunOnUIThread here object currentValue; bool currentIsAvailable = _sourceBinding.TryGetValue(out currentValue); UpdateTargetFromSource(currentIsAvailable, currentValue); } }
public MvxSourcePropertyBindingEventArgs(IMvxSourceBinding propertySourceBinding) { _isAvailable = propertySourceBinding.TryGetValue(out _value); }
public MvxSourcePropertyBindingEventArgs(IMvxSourceBinding propertySourceBinding) { _isAvailable = propertySourceBinding.TryGetValue(out _value); }