|
|
@ -33,6 +33,7 @@ public abstract partial class BindingExpressionTests |
|
|
RelativeSource? relativeSource, |
|
|
RelativeSource? relativeSource, |
|
|
Optional<TIn> source, |
|
|
Optional<TIn> source, |
|
|
object? targetNullValue, |
|
|
object? targetNullValue, |
|
|
|
|
|
string? stringFormat, |
|
|
UpdateSourceTrigger updateSourceTrigger) |
|
|
UpdateSourceTrigger updateSourceTrigger) |
|
|
{ |
|
|
{ |
|
|
var target = new TargetClass { DataContext = dataContext }; |
|
|
var target = new TargetClass { DataContext = dataContext }; |
|
|
@ -66,6 +67,7 @@ public abstract partial class BindingExpressionTests |
|
|
mode: mode, |
|
|
mode: mode, |
|
|
targetNullValue: targetNullValue, |
|
|
targetNullValue: targetNullValue, |
|
|
targetTypeConverter: TargetTypeConverter.GetReflectionConverter(), |
|
|
targetTypeConverter: TargetTypeConverter.GetReflectionConverter(), |
|
|
|
|
|
stringFormat: stringFormat, |
|
|
updateSourceTrigger: updateSourceTrigger); |
|
|
updateSourceTrigger: updateSourceTrigger); |
|
|
|
|
|
|
|
|
target.GetValueStore().AddBinding(targetProperty, bindingExpression); |
|
|
target.GetValueStore().AddBinding(targetProperty, bindingExpression); |
|
|
@ -87,6 +89,7 @@ public abstract partial class BindingExpressionTests |
|
|
RelativeSource? relativeSource, |
|
|
RelativeSource? relativeSource, |
|
|
Optional<TIn> source, |
|
|
Optional<TIn> source, |
|
|
object? targetNullValue, |
|
|
object? targetNullValue, |
|
|
|
|
|
string? stringFormat, |
|
|
UpdateSourceTrigger updateSourceTrigger) |
|
|
UpdateSourceTrigger updateSourceTrigger) |
|
|
{ |
|
|
{ |
|
|
var target = new TargetClass { DataContext = dataContext }; |
|
|
var target = new TargetClass { DataContext = dataContext }; |
|
|
@ -112,6 +115,7 @@ public abstract partial class BindingExpressionTests |
|
|
mode: mode, |
|
|
mode: mode, |
|
|
targetNullValue: targetNullValue, |
|
|
targetNullValue: targetNullValue, |
|
|
targetTypeConverter: TargetTypeConverter.GetReflectionConverter(), |
|
|
targetTypeConverter: TargetTypeConverter.GetReflectionConverter(), |
|
|
|
|
|
stringFormat: stringFormat, |
|
|
updateSourceTrigger: updateSourceTrigger); |
|
|
updateSourceTrigger: updateSourceTrigger); |
|
|
target.GetValueStore().AddBinding(targetProperty, bindingExpression); |
|
|
target.GetValueStore().AddBinding(targetProperty, bindingExpression); |
|
|
return (target, bindingExpression); |
|
|
return (target, bindingExpression); |
|
|
@ -129,7 +133,8 @@ public abstract partial class BindingExpressionTests |
|
|
BindingMode mode = BindingMode.OneWay, |
|
|
BindingMode mode = BindingMode.OneWay, |
|
|
RelativeSource? relativeSource = null, |
|
|
RelativeSource? relativeSource = null, |
|
|
Optional<TIn> source = default, |
|
|
Optional<TIn> source = default, |
|
|
object? targetNullValue = null) |
|
|
object? targetNullValue = null, |
|
|
|
|
|
string? stringFormat = null) |
|
|
where TIn : class? |
|
|
where TIn : class? |
|
|
{ |
|
|
{ |
|
|
var (target, _) = CreateTargetAndExpression( |
|
|
var (target, _) = CreateTargetAndExpression( |
|
|
@ -143,7 +148,8 @@ public abstract partial class BindingExpressionTests |
|
|
mode, |
|
|
mode, |
|
|
relativeSource, |
|
|
relativeSource, |
|
|
source, |
|
|
source, |
|
|
targetNullValue); |
|
|
targetNullValue, |
|
|
|
|
|
stringFormat); |
|
|
return target; |
|
|
return target; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -158,6 +164,7 @@ public abstract partial class BindingExpressionTests |
|
|
BindingMode mode = BindingMode.OneWay, |
|
|
BindingMode mode = BindingMode.OneWay, |
|
|
RelativeSource? relativeSource = null, |
|
|
RelativeSource? relativeSource = null, |
|
|
object? targetNullValue = null, |
|
|
object? targetNullValue = null, |
|
|
|
|
|
string? stringFormat = null, |
|
|
UpdateSourceTrigger updateSourceTrigger = UpdateSourceTrigger.PropertyChanged) |
|
|
UpdateSourceTrigger updateSourceTrigger = UpdateSourceTrigger.PropertyChanged) |
|
|
where TIn : class? |
|
|
where TIn : class? |
|
|
{ |
|
|
{ |
|
|
@ -173,6 +180,7 @@ public abstract partial class BindingExpressionTests |
|
|
relativeSource, |
|
|
relativeSource, |
|
|
source, |
|
|
source, |
|
|
targetNullValue, |
|
|
targetNullValue, |
|
|
|
|
|
stringFormat, |
|
|
updateSourceTrigger); |
|
|
updateSourceTrigger); |
|
|
return target; |
|
|
return target; |
|
|
} |
|
|
} |
|
|
@ -189,6 +197,7 @@ public abstract partial class BindingExpressionTests |
|
|
RelativeSource? relativeSource = null, |
|
|
RelativeSource? relativeSource = null, |
|
|
Optional<TIn> source = default, |
|
|
Optional<TIn> source = default, |
|
|
object? targetNullValue = null, |
|
|
object? targetNullValue = null, |
|
|
|
|
|
string? stringFormat = null, |
|
|
UpdateSourceTrigger updateSourceTrigger = UpdateSourceTrigger.PropertyChanged) |
|
|
UpdateSourceTrigger updateSourceTrigger = UpdateSourceTrigger.PropertyChanged) |
|
|
where TIn : class? |
|
|
where TIn : class? |
|
|
{ |
|
|
{ |
|
|
@ -213,6 +222,7 @@ public abstract partial class BindingExpressionTests |
|
|
relativeSource, |
|
|
relativeSource, |
|
|
source, |
|
|
source, |
|
|
targetNullValue, |
|
|
targetNullValue, |
|
|
|
|
|
stringFormat, |
|
|
updateSourceTrigger); |
|
|
updateSourceTrigger); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -228,6 +238,7 @@ public abstract partial class BindingExpressionTests |
|
|
RelativeSource? relativeSource, |
|
|
RelativeSource? relativeSource, |
|
|
Optional<TIn> source, |
|
|
Optional<TIn> source, |
|
|
object? targetNullValue, |
|
|
object? targetNullValue, |
|
|
|
|
|
string? stringFormat, |
|
|
UpdateSourceTrigger updateSourceTrigger) |
|
|
UpdateSourceTrigger updateSourceTrigger) |
|
|
where TIn : class?; |
|
|
where TIn : class?; |
|
|
|
|
|
|
|
|
|