File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,26 @@ public RichSuggestToken(Guid id, string displayText)
63
63
64
64
internal void UpdateTextRange ( ITextRange range )
65
65
{
66
- bool invoke = _range == null || RangeStart != range . StartPosition || RangeEnd != range . EndPosition ;
66
+ bool rangeStartChanged = RangeStart != range . StartPosition ;
67
+ bool rangeEndChanged = RangeEnd != range . EndPosition ;
68
+ bool positionChanged = _range == null || rangeStartChanged ;
67
69
_range = range . GetClone ( ) ;
68
70
RangeStart = _range . StartPosition ;
69
71
RangeEnd = _range . EndPosition ;
70
72
71
- if ( invoke )
73
+ if ( rangeStartChanged )
72
74
{
73
- PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( string . Empty ) ) ;
75
+ PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( nameof ( RangeStart ) ) ) ;
76
+ }
77
+
78
+ if ( rangeEndChanged )
79
+ {
80
+ PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( nameof ( RangeEnd ) ) ) ;
81
+ }
82
+
83
+ if ( positionChanged )
84
+ {
85
+ PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( nameof ( Position ) ) ) ;
74
86
}
75
87
}
76
88
You can’t perform that action at this time.
0 commit comments