Transparent control, C#
-
Sorry for such question (I think it was earlier, but my problem is below): I'm trying to find transparent controls and all I'd found are only ones, which background-transparent, but not on-control-transparent: picture: Transparent[^] As you can see, usual button cannot be seen under glass transparent button.
-
Sorry for such question (I think it was earlier, but my problem is below): I'm trying to find transparent controls and all I'd found are only ones, which background-transparent, but not on-control-transparent: picture: Transparent[^] As you can see, usual button cannot be seen under glass transparent button.
it's because, in WinForm, transparency is faked by calling OnPaintBackground() of the parent from the child control. There is no solution I'm afraid... But it works like a charm in WPF if you must know! ;P
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
it's because, in WinForm, transparency is faked by calling OnPaintBackground() of the parent from the child control. There is no solution I'm afraid... But it works like a charm in WPF if you must know! ;P
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
and is there any way to "inherit" form opacity? on WPF, i know -\
-
and is there any way to "inherit" form opacity? on WPF, i know -\
In WPF all control are transparent. This is made easy due to the fact that there is only one operating system Window/HWND object: the top level object (the form). I.e. everything (save the top level window) is just a logical object not backed-up / constrained by any OS handle. However the Windows OS does support Windows transparency, and so WPF can support it too. There is a flag to set somewhere to have a transparent window. I haven't use it much so I forgot, but it's easy.
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
In WPF all control are transparent. This is made easy due to the fact that there is only one operating system Window/HWND object: the top level object (the form). I.e. everything (save the top level window) is just a logical object not backed-up / constrained by any OS handle. However the Windows OS does support Windows transparency, and so WPF can support it too. There is a flag to set somewhere to have a transparent window. I haven't use it much so I forgot, but it's easy.
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
flag somewhere, where not everyone can see?(
-
flag somewhere, where not everyone can see?(
Flag somewhere that everyone can see in the documentation! Popup.AllowsTransparency Window.AllowsTransparency It is advised to read the documentation to known about additional little quirks, like this one: "When the Background property of a window is set to a transparent color, using Transparent for example, the window remains opaque. This means that the desktop and any running applications "beneath" the window cannot be seen. To enable this type of transparency, AllowsTransparency must be set to true. AllowsTransparency exists to facilitate the creation of non-rectangular windows, and, consequently, when AllowsTransparency is set to true, a window's WindowStyle property must be set to None."
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.