Window Workspace not showing all of UserControl

Topics: CAB & Smart Client Software Factory
Mar 21, 2006 at 4:55 PM
originally posted by: calvertmg

To get a user control displaying completely in a windows form (Microsoft.Practices.CompositeUI.WinForms.WindowWorkspace) I changed the following method in the WindowWorkspace class

FROM:

private void CalculateSize(Control smartPart, Form form)
{
form.Size = new Size(smartPart.Size.Width, smartPart.Size.Height + 20);
}

TO:

private void CalculateSize(Control smartPart, Form form)
{
form.ClientSize = smartPart.Size;
}