@@ -106,7 +106,11 @@ private void ImageCropperThumb_KeyUp(object sender, KeyRoutedEventArgs e)
106106 _currentCroppedRect = croppedRect ;
107107 }
108108
109- UpdateImageLayout ( true ) ;
109+ if ( TryUpdateImageLayout ( true ) )
110+ {
111+ UpdateSelectionThumbs ( true ) ;
112+ UpdateMaskArea ( true ) ;
113+ }
110114 }
111115
112116 private void ImageCropperThumb_ManipulationCompleted ( object sender , ManipulationCompletedRoutedEventArgs e )
@@ -119,7 +123,11 @@ private void ImageCropperThumb_ManipulationCompleted(object sender, Manipulation
119123 _currentCroppedRect = croppedRect ;
120124 }
121125
122- UpdateImageLayout ( true ) ;
126+ if ( TryUpdateImageLayout ( true ) )
127+ {
128+ UpdateSelectionThumbs ( true ) ;
129+ UpdateMaskArea ( true ) ;
130+ }
123131 }
124132
125133 private void ImageCropperThumb_ManipulationDelta ( object sender , ManipulationDeltaRoutedEventArgs e )
@@ -161,7 +169,12 @@ private void SourceImage_ManipulationDelta(object sender, ManipulationDeltaRoute
161169 var croppedRect = _inverseImageTransform . TransformBounds ( selectedRect ) ;
162170 croppedRect . Intersect ( _restrictedCropRect ) ;
163171 _currentCroppedRect = croppedRect ;
164- UpdateImageLayout ( ) ;
172+
173+ if ( TryUpdateImageLayout ( ) )
174+ {
175+ UpdateSelectionThumbs ( ) ;
176+ UpdateMaskArea ( ) ;
177+ }
165178 }
166179
167180 private void ImageCanvas_SizeChanged ( object sender , SizeChangedEventArgs e )
@@ -171,8 +184,16 @@ private void ImageCanvas_SizeChanged(object sender, SizeChangedEventArgs e)
171184 return ;
172185 }
173186
174- UpdateImageLayout ( ) ;
175- UpdateMaskArea ( ) ;
187+ if ( TryUpdateImageLayout ( ) )
188+ {
189+ UpdateSelectionThumbs ( ) ;
190+ }
191+
192+ if ( TryUpdateAspectRatio ( ) )
193+ {
194+ UpdateSelectionThumbs ( ) ;
195+ UpdateMaskArea ( ) ;
196+ }
176197 }
177198 }
178199}
0 commit comments