File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/Controls/tests/Xaml.UnitTests/Issues Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -220,10 +220,9 @@ public void SwitchingBindingAfterModifyingValueTriggersPropertyChanged([Values]
220220 }
221221
222222 [ Test ]
223- public void SwitchingBindingToSameValueDoesNotTriggerPropertyChanged ( [ Values ] XamlInflator inflator )
223+ public void SwitchingBindingToSameValueMaintainsCorrectValue ( [ Values ] XamlInflator inflator )
224224 {
225- // When switching bindings but the value remains the same,
226- // PropertyChanged should NOT fire (optimization)
225+ // The value should be correct regardless of PropertyChanged firing behavior
227226
228227 var page = new Maui29459 ( inflator ) ;
229228 var viewModel = new Maui29459ViewModel { A = 50 , B = 50 } ; // Same values
@@ -237,8 +236,7 @@ public void SwitchingBindingToSameValueDoesNotTriggerPropertyChanged([Values] Xa
237236 page . MyControl . SetBinding ( Maui29459CustomControl . ValueProperty , nameof ( Maui29459ViewModel . B ) ) ;
238237
239238 Assert . That ( page . MyControl . Value , Is . EqualTo ( 50 ) , "Value should remain 50" ) ;
240- // Note: PropertyChanged may or may not fire when values are equal - this is implementation-dependent
241- // The key assertion is that the Value is correct
239+ // PropertyChangedCount behavior is implementation-defined when values are equal; no assertion is made.
242240 }
243241 }
244242}
You can’t perform that action at this time.
0 commit comments