I have Topmost fullscreen window
AllowsTransparency="True" WindowStyle="None" Topmost="True" WindowState="Maximized" Left="0" Top="0"
OpacityMask="#2B000000" Background="Black" Cursor="Cross"
and I’m drawing rectangle when user holds LMB and moves mouse (it’s selection, like on screenshot in this my question Easiest way to select screen region ).
I want to make rectangle completely transparent, to see content behind window. But I can’t make it more transparent than parent window. What should I do?
Try something like below and dynamically change the size and location of the second RectangleGeometry (selectRect) in some mouse event handler. And perhaps also adjust the size of the first RectangleGeometry to your screen size.
A problem might however be that you won’t get any mouse events in the excluded part of the CombinedGeometry. To avoid that you could attach the mouse handlers to the Window (instead of the Path) and give it a nearly transparent background.
EDIT: An even simpler solution might be a Border. You could independently adjust the four components of the BorderThickness.