Hi,
I'm experimenting with the per-pixel opacity and I used the "MSN stockwatch" example from unni's blog http://blogs.msdn.com/unnir/archive/2006/03/01/541154.aspx
Problem is that I don't see anything. At first, I had two windows open, but I fixed that. But all I see now is that there's a window open, but not visible. Anyone who had this problem that can/wants to help me
thanks in advance,
kimme

Using per-pixel opacity and there's nothing to see
moleman
this might help
http://blogs.msdn.com/llobo/archive/2006/02/24/538757.aspx
Wilfred Tang
Hi,
Can you include some code for me to take a look at, might be easier to see what the problem is
Thanks
Andy
HSS Guido
Hi Kimme,
> At first, I had two windows open, but I fixed that. But all I see now is that there's a window open, but not visible.
Can you describe the problem in a bit more detail Do you see the chrome of the window with a black box No window/chrome at all
thx, Seema
MARUN
public partial class MyApp : Application {
HwndSource testHwnd;
protected override void OnStartup(StartupEventArgs e) {
base.OnStartup(e);
Rect workArea = SystemParameters.WorkArea;
HwndSourceParameters parameters = new HwndSourceParameters("TestWindow");
parameters.PositionX = (int)(workArea.Width/2);
parameters.PositionY = (int)(workArea.Height/2);
parameters.UsesPerPixelOpacity = true;
testHwnd = new HwndSource(parameters);
object o = Application.LoadComponent(new Uri("Window1.baml",
UriKind.Relative));
FrameworkElement child = o as FrameworkElement;
testHwnd.RootVisual = child;
testHwnd.Disposed += new EventHandler(testHwnd_Disposed);
}
void testHwnd_Disposed(object sender, EventArgs e) {
this.Shutdown();
}
}
DOlmsted
daz1
Teppei
Hi,
A few words of advice on this.
it will only work with single window applications and not applications that use NavigationWindow or mutiple window containers. The reason for this is pixel ownership, when you set opactity on window its for that window while window containers sit at a level below that and can't channel opacity into any windows within it. For this to work I suspect would need a big change to the API that won't happen in the v1 timeframe (but who's to say it won't make it into the v2 timeframe). So in general for opque windows to work you will need a single window.
HTH
Andy