UsesPerPixelOpacity example
Lester Lobo posted an example of UsesPerPixelOpacity=true: https://blogs.msdn.com/llobo/archive/2006/02/24/538757.aspx
Keep in mind you don't need to use HwndSource -- you can use the Popup class instead, which is generally more convenient since it saves you some pinvoking.
Comments
- Anonymous
February 28, 2006
Popup is nice, but there is no "UsesPerPixelOpacity" property? Or is there any other way to implement transparency? - Anonymous
March 01, 2006
Note that there's another sample showing the new UsesPerPixelOpacity stuff in the FebCTP version of the SDK. The sample is under "Cross-technology Samples" (unfortunately), and is called GadgetUILibrary. Defines a GadgetWindow class that you pass a Visual to and show ... pretty much takes care of everything else. - Anonymous
March 01, 2006
Nice sample, but the transparency does not work on my machine. And second it also uses the HwndSource and some ugly Win32 calls. So do i miss something? - Anonymous
March 31, 2006
Roland, I got transparency to work on a Popup by setting AllowsTransparency=true. - Anonymous
April 03, 2006
Ahh, thanks a lot. Now the Popup works with transparency and without any HwndSource and W32 stuff:-)