Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
The project here is in WPF and the main shell is using GlassWindow appearance, meaning AllowTransparency property is set to true.
The problem with this property is that it doesn`t go well with DirectX.
We have a user control inside our app and inside that user control we display streaming video.

The user control cannot internally control the transparency. The property AllowTransparency must relate to a window with a handle.

How can I make the user control ignore the transparency?

Thanks
Posted

1 solution

Well, obviously there is no workaround on your request.
As far as your control is hosted in WPF window , so it fully controlling by parent object.
If we look at your problem from interop mechanism , we can conclude that in WPF there is only one HWND (window's handle from WIN32 API terminology) for all childs control, so as a result transparency of your video ctrl is dependant from main Window..
And one more for more compelling words look what MS said:
"OS cannot render any object without having a reference to HWND to its kernel. Hence is the case with WPF. So WPF window actually holds a reference to one window handle. Even you can get Window Handle for any Visual inside the WPF window"

So as a rusult -> Every Visual of WPF does not have its own HANDLE associated with it, rather it is a content for the outside window element, Hence you can say, every WPF control is owned by its parent window.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900