This repository was archived by the owner on Oct 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,28 +218,15 @@ public override void SetPosition(PlacementInformation info)
218218 margin . Bottom = GetRowOffset ( bottomRowIndex + 1 ) - info . Bounds . Bottom ;
219219 info . Item . Properties [ FrameworkElement . MarginProperty ] . SetValue ( margin ) ;
220220
221- var widthIsSet = info . Item . Properties [ FrameworkElement . WidthProperty ] . IsSet ;
222- var heightIsSet = info . Item . Properties [ FrameworkElement . HeightProperty ] . IsSet ;
223- if ( ! widthIsSet )
224- {
225- if ( ha == HorizontalAlignment . Stretch )
226- info . Item . Properties [ FrameworkElement . WidthProperty ] . Reset ( ) ;
227- else
228- info . Item . Properties [ FrameworkElement . WidthProperty ] . SetValue ( info . Bounds . Width ) ;
229- }
230- else {
221+ if ( ha == HorizontalAlignment . Stretch )
222+ info . Item . Properties [ FrameworkElement . WidthProperty ] . Reset ( ) ;
223+ else
231224 info . Item . Properties [ FrameworkElement . WidthProperty ] . SetValue ( info . Bounds . Width ) ;
232- }
233- if ( ! heightIsSet )
234- {
235- if ( va == VerticalAlignment . Stretch )
236- info . Item . Properties [ FrameworkElement . HeightProperty ] . Reset ( ) ;
237- else
238- info . Item . Properties [ FrameworkElement . HeightProperty ] . SetValue ( info . Bounds . Height ) ;
239- }
240- else {
225+
226+ if ( va == VerticalAlignment . Stretch )
227+ info . Item . Properties [ FrameworkElement . HeightProperty ] . Reset ( ) ;
228+ else
241229 info . Item . Properties [ FrameworkElement . HeightProperty ] . SetValue ( info . Bounds . Height ) ;
242- }
243230 }
244231
245232 public override void LeaveContainer ( PlacementOperation operation )
You can’t perform that action at this time.
0 commit comments