Need help to make window as overlay in WinUI3 application development.

asked 2021-11-03T15:59:34.18+00:00
MM, Sunil 81 Reputation points


Hi Team,

I have created WinUI3 project to make a overlay application show it on top of every other application.
I need below things to be implemented.

  1. How to change the background color of the window.
  2. How to remove the close icon in the top right corner of the winow.
  3. how to remove the image and title bar from the window.
  4. how to make the window transparent.

the code which i wrote is attached here.

help me to create a overlay kind of application here.

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
430 questions
No comments
{count} votes

Accepted answer
  1. answered 2021-11-03T18:30:56.743+00:00
    Castorix31 65,366 Reputation points

    You can call

    _presenter.SetBorderAndTitleBar(false, false);  

    You can change the transparency with SetLayeredWindowAttributes

    You can change the background with a Grid, a Border and Border.Background
    For example, I have set a Gradient as background in the XAML :

                        <LinearGradientBrush StartPoint='0,0' EndPoint='1,1'>  
                            <GradientStop Color='Yellow' Offset='0.0' />  
                            <GradientStop Color='Red' Offset='0.25' />  
                            <GradientStop Color='Blue' Offset='0.75' />  
                            <GradientStop Color='LimeGreen' Offset='1.0' />  

    I get :


0 additional answers

Sort by: Most helpful