Windows Vista Beta | WinVistaBeta.com - Message | Resize Windows at run-time with AllowTransparency issue

November 20, 2008  
Subject: Resize Windows at run-time with AllowTransparency issue
Group: microsoft.public.windows.developer.winfx.avalon,microsoft.public.windows.developer.winfx.general
Date: 5/23/2007 7:17:17 AM
From: "Vincent RITHNER || hotmail" [Email Address Protection]


Hi ,

We have an issue with Window with Transparency= true to resize them at
run-time

We want to create non-rectangular Window with no border and Full
transparency;
so, we have create a Window with AllowTransparency=true and we have added a
Grid with some Controls inside;
this works well and the window can be dragged on the desktop;

The issue is coming when I try to resize my window at run-time; as I don't
have any border, I have added a Thumb control and
I use the DragDelta method to do the job;
the real issue is when I resize my Grid in a bigger size which make parts of
it clipped outside the window;
so, I have tried to resize dynamically the window in same time of the grid
in the DragDelta method, but it seems that's a bug doesn't allow this ...

Steps to reproduce:

we create a Windows with AllowTransparency=true and inside we add a grid,
then inside some controls;
at runtime, we use a Thump control to resize the grid and offcourse, we have
to resize the Windows otherwise some parts of the displayed grid are
rendered outside the window;

we played with a lot of windows property but we can't make it work....

later, we have discovered that if we set the window border visible removing
the AllowTransparency, then relaunch the sample:

- we click on the red square to resize, the windows doesn't size
- Take the mouse and size manually once the windows, then click again the
red square, now the windows resize ...

I know I could set the Window with a size of 2000x2000 to be sure but I
would avoid having huge window for nothing...

Thxs for any help

Regards

-Vince



Back