Skip to content

Commit e3ef2a8

Browse files
trucksmartglennawatson
authored andcommitted
feature: Added SuspendLayout to RoutedViewHost WinForms control. (#2200)
1 parent 1357b14 commit e3ef2a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ReactiveUI.Winforms/RoutedViewHost.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public RoutedControlHost()
5151
x =>
5252
{
5353
// clear all hosted controls (view or default content)
54+
SuspendLayout();
5455
Controls.Clear();
5556

5657
if (viewLastAdded != null)
@@ -66,6 +67,7 @@ public RoutedControlHost()
6667
Controls.Add(DefaultContent);
6768
}
6869

70+
ResumeLayout();
6971
return;
7072
}
7173

@@ -75,6 +77,7 @@ public RoutedControlHost()
7577

7678
viewLastAdded = InitView((Control)view);
7779
Controls.Add(viewLastAdded);
80+
ResumeLayout();
7881
}, RxApp.DefaultExceptionHandler.OnNext));
7982
}
8083

0 commit comments

Comments
 (0)