Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8649131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:29:00+00:00 2026-06-12T13:29:00+00:00

I have Topmost fullscreen window AllowsTransparency=True WindowStyle=None Topmost=True WindowState=Maximized Left=0 Top=0 OpacityMask=#2B000000 Background=Black Cursor=Cross

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:29:01+00:00Added an answer on June 12, 2026 at 1:29 pm

    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.

    <Window x:Class="TransparentRectangle.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                WindowStyle="None" WindowState="Maximized"
                AllowsTransparency="True" Background="Transparent">
        <Grid>
            <Path Fill="Black" Opacity="0.5">
                <Path.Data>
                    <CombinedGeometry GeometryCombineMode="Exclude">
                        <CombinedGeometry.Geometry1>
                            <RectangleGeometry x:Name="screenRect" Rect="0,0,2000,2000"/>
                        </CombinedGeometry.Geometry1>
                        <CombinedGeometry.Geometry2>
                            <RectangleGeometry x:Name="selectRect" Rect="100,100,200,100"/>
                        </CombinedGeometry.Geometry2>
                    </CombinedGeometry>
                </Path.Data>
            </Path>
        </Grid>
    </Window>
    

    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.

    <Window ... Background="#01000000" MouseMove=... etc>
        ...
    </Window>
    

    EDIT: An even simpler solution might be a Border. You could independently adjust the four components of the BorderThickness.

    <Grid ...>
        <Border BorderBrush="Black" Opacity="0.5" BorderThickness="100,100,200,400"/>
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fullscreen window with the Topmost property set to true. Whenever an
I have a WPF window that has TopMost=true . When I call another Window
I have found the Form.TopMost property but it puts the form on top of
I have a WPF window that goes fullscreen, and I have made every attempt
I'm writing a C++ program with a topmost window so you don't have any
I have the following XAML: <TreeView> <TreeViewItem ItemsSource={Binding} Header=TopMost IsExpanded=True> <TreeViewItem.ItemTemplate> <DataTemplate> <TreeViewItem> <TreeViewItem.Header>
I have a fullscreen window, and I want to prevent pop up windows that
I have a main window created with : if (!fullscreen) { wStyle = WS_OVERLAPPED
I have two windows form and both set the topmost property to true. But
I have a clock application. I have set the Window's TopMost property. But, randomly,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.