Posted 16 years ago
by Bjørnar Sundsbø
- Norway
Version: 4.5.0484
Platform: .NET 3.5
Environment: Windows XP (32-bit)
When using the RibbonWindow and performing a Maximize/Restore, layout is performed twice. This is a problem because I use a COM object on resize to generate a map image which fails when the first attempt is aborted when the second resize event fires.
Using a normal Window, this is not an issue. I expect this might be because the template is applied after the window is resized, which leads to a new resize when using the RibbonWindow.
To reproduce, simply create a RibbonWindow with the following addition to the codebehind:If you add a usercontrol inside a grid and have it fill the window, and override the same method; the second time the event fires the size will have a difference of 8 pixels in both directions from the first event.
Is there a way I work around this until there is a new release with a fix for this issue?
- Bjørnar
[Modified at 02/25/2009 08:24 AM]
Using a normal Window, this is not an issue. I expect this might be because the template is applied after the window is resized, which leads to a new resize when using the RibbonWindow.
To reproduce, simply create a RibbonWindow with the following addition to the codebehind:
protected override Size ArrangeOverride(Size arrangeBounds)
{
Size size = base.ArrangeOverride(arrangeBounds);
System.Diagnostics.Trace.WriteLine("ArrangeOverride " + size);
return size;
}
Is there a way I work around this until there is a new release with a fix for this issue?
- Bjørnar
[Modified at 02/25/2009 08:24 AM]
Bjørnar Sundsbø