Closed bisato closed 7 years ago
See how it achieved in integration tests on CalcBinding:
var targetObject = new TextBox();
var calcBinding = new CalcBinding.Binding(path);
targetObject.DataContext = source;
var bindingExpression = calcBinding.ProvideValue(new ServiceProviderMock(targetObject, targetProperty, resolvedTypes));
targetObject.SetValue(targetObject.TextProperty, bindingExpression);
You should use 'null' or empty class instead of ServiceProviderMock.
reference: https://github.com/Alex141/CalcBinding/blob/master/Tests/BaseSystemTests.cs line 174
very nice. Thanks.
The CalcBinding can not be set with:
myLabel.SetBinding(Label.ContentProperty, calcBinding);
because CalcBinding does not inherit BindingBase. How can this be achieved?