@@ -106,7 +106,11 @@ private void ImageCropperThumb_KeyUp(object sender, KeyRoutedEventArgs e)
106
106
_currentCroppedRect = croppedRect ;
107
107
}
108
108
109
- UpdateImageLayout ( true ) ;
109
+ if ( TryUpdateImageLayout ( true ) )
110
+ {
111
+ UpdateSelectionThumbs ( true ) ;
112
+ UpdateMaskArea ( true ) ;
113
+ }
110
114
}
111
115
112
116
private void ImageCropperThumb_ManipulationCompleted ( object sender , ManipulationCompletedRoutedEventArgs e )
@@ -119,7 +123,11 @@ private void ImageCropperThumb_ManipulationCompleted(object sender, Manipulation
119
123
_currentCroppedRect = croppedRect ;
120
124
}
121
125
122
- UpdateImageLayout ( true ) ;
126
+ if ( TryUpdateImageLayout ( true ) )
127
+ {
128
+ UpdateSelectionThumbs ( true ) ;
129
+ UpdateMaskArea ( true ) ;
130
+ }
123
131
}
124
132
125
133
private void ImageCropperThumb_ManipulationDelta ( object sender , ManipulationDeltaRoutedEventArgs e )
@@ -161,7 +169,12 @@ private void SourceImage_ManipulationDelta(object sender, ManipulationDeltaRoute
161
169
var croppedRect = _inverseImageTransform . TransformBounds ( selectedRect ) ;
162
170
croppedRect . Intersect ( _restrictedCropRect ) ;
163
171
_currentCroppedRect = croppedRect ;
164
- UpdateImageLayout ( ) ;
172
+
173
+ if ( TryUpdateImageLayout ( ) )
174
+ {
175
+ UpdateSelectionThumbs ( ) ;
176
+ UpdateMaskArea ( ) ;
177
+ }
165
178
}
166
179
167
180
private void ImageCanvas_SizeChanged ( object sender , SizeChangedEventArgs e )
@@ -171,8 +184,16 @@ private void ImageCanvas_SizeChanged(object sender, SizeChangedEventArgs e)
171
184
return ;
172
185
}
173
186
174
- UpdateImageLayout ( ) ;
175
- UpdateMaskArea ( ) ;
187
+ if ( TryUpdateImageLayout ( ) )
188
+ {
189
+ UpdateSelectionThumbs ( ) ;
190
+ }
191
+
192
+ if ( TryUpdateAspectRatio ( ) )
193
+ {
194
+ UpdateSelectionThumbs ( ) ;
195
+ UpdateMaskArea ( ) ;
196
+ }
176
197
}
177
198
}
178
199
}
0 commit comments