@ -138,7 +138,7 @@ internal class BindingExpression : UntypedBindingExpressionBase, IDescription, I
get
get
{
{
var b = new StringBuilder ( ) ;
var b = new StringBuilder ( ) ;
LeafNode . BuildString ( b , _ nodes ) ;
LeafNode ? . BuildString ( b , _ nodes ) ;
return b . ToString ( ) ;
return b . ToString ( ) ;
}
}
}
}
@ -149,7 +149,7 @@ internal class BindingExpression : UntypedBindingExpressionBase, IDescription, I
public CultureInfo ConverterCulture = > _ uncommon ? . _ converterCulture ? ? CultureInfo . CurrentCulture ;
public CultureInfo ConverterCulture = > _ uncommon ? . _ converterCulture ? ? CultureInfo . CurrentCulture ;
public object? ConverterParameter = > _ uncommon ? . _ converterParameter ;
public object? ConverterParameter = > _ uncommon ? . _ converterParameter ;
public object? FallbackValue = > _ uncommon is not null ? _ uncommon . _f allbackValue : AvaloniaProperty . UnsetValue ;
public object? FallbackValue = > _ uncommon is not null ? _ uncommon . _f allbackValue : AvaloniaProperty . UnsetValue ;
public ExpressionNode LeafNode = > _ nodes [ _ nodes . Count - 1 ] ;
public ExpressionNode ? LeafNode = > _ nodes . Count > 0 ? _ nodes [ _ nodes . Count - 1 ] : null ;
public string? StringFormat = > _ uncommon ? . _ stringFormat ;
public string? StringFormat = > _ uncommon ? . _ stringFormat ;
public object? TargetNullValue = > _ uncommon ? . _ targetNullValue ? ? AvaloniaProperty . UnsetValue ;
public object? TargetNullValue = > _ uncommon ? . _ targetNullValue ? ? AvaloniaProperty . UnsetValue ;
public UpdateSourceTrigger UpdateSourceTrigger = > _ uncommon ? . _ updateSourceTrigger ? ? UpdateSourceTrigger . PropertyChanged ;
public UpdateSourceTrigger UpdateSourceTrigger = > _ uncommon ? . _ updateSourceTrigger ? ? UpdateSourceTrigger . PropertyChanged ;
@ -360,7 +360,7 @@ internal class BindingExpression : UntypedBindingExpressionBase, IDescription, I
// Don't set the value if it's unchanged. If there is a binding error, we still have to set the value
// Don't set the value if it's unchanged. If there is a binding error, we still have to set the value
// in order to clear the error.
// in order to clear the error.
if ( TypeUtilities . IdentityEquals ( LeafNode . Value , value , type ) & & ErrorType = = BindingErrorType . None )
if ( TypeUtilities . IdentityEquals ( LeafNode ! . Value , value , type ) & & ErrorType = = BindingErrorType . None )
return true ;
return true ;
try
try
@ -515,7 +515,8 @@ internal class BindingExpression : UntypedBindingExpressionBase, IDescription, I
if ( TryGetTarget ( out var target ) & &
if ( TryGetTarget ( out var target ) & &
TargetProperty is not null & &
TargetProperty is not null & &
target . GetValue ( TargetProperty ) is var value & &
target . GetValue ( TargetProperty ) is var value & &
! TypeUtilities . IdentityEquals ( value , LeafNode . Value , TargetType ) )
LeafNode is { } leafNode & &
! TypeUtilities . IdentityEquals ( value , leafNode . Value , TargetType ) )
{
{
WriteValueToSource ( value ) ;
WriteValueToSource ( value ) ;
}
}