windowworkspace bug report

Topics: CAB & Smart Client Software Factory
Nov 17, 2005 at 12:46 PM
originally posted by: gamania

lately i found there is a very annoying bug in windowworkspace. the windowsize cannot contain the view in full by default. to test it, i only did 3 lines code.

WindowWorkspace ww = new WindowWorkspace();
WindowSmartPartInfo spi = new WindowSmartPartInfo();
ww.Show(new TitledSmartPart(), spi);

i used smartpartquickstart as testing platform. some small part of right and bottom of the view are cut off. will there be any fix for this?
Nov 17, 2005 at 8:48 PM
originally posted by: gamania

I changed the code in WindowWorkspace.cs, line 153. function CalculateSize.

private void CalculateSize(Control smartPart, Form form)
{
form.Size = new Size(
smartPart.Size.Width + SystemInformation.FrameBorderSize.Width * 2,
smartPart.Size.Height + SystemInformation.FrameBorderSize.Height * 2 +
SystemInformation.CaptionHeight);
}

I hope this is the right fix for all the situations. At least, it works well for default windowssmartpartinfo set up.
Nov 18, 2005 at 9:20 PM
originally posted by: samkuehn

Awesome gamania...I was having the same problem and your solution fixed it for me!!!
Nov 25, 2005 at 12:30 PM
originally posted by: gamania

the original code is written by design? it's not fixed in the just released VB code either.
Nov 26, 2005 at 8:37 AM
originally posted by: BradWilsonMSFT

The VB code that was released is a straight port, and includes the bugs that have been recently reported. We are still deciding what our strategy is for these bugs. It's of utmost importance to us that the final release of C# and VB be 100% compatible with one another.
Dec 2, 2005 at 1:25 PM
originally posted by: cnathani

Does WindowWorkspace open up the view in a separate Window? (new Dialog?)
Dec 2, 2005 at 5:14 PM
originally posted by: gamania

yes, it's a new window