WinUI3 : How to put an transparent grey overlay on Canvas

Harshithraj1871 1,421 Reputation points


I'm working on a WinUI3 desktop application in c++. I was trying to achieve an experience where we can show a ProgressRing in the center of the screen when there is a delay in screen update. In my application, my window has a Canvas as its content and that canvas contains many widgets. I want to put a new Canvas as an overlay on top of the existing Canvas and show a ProgressRing on the new Overlay Canvas and i was able to achieve an expriance like this. User's image

The overlay Canvas in the image has a background color as transparent, I wanted to make the overlay canvas translucent. So that all the widgets below the overlay canvas will look like grayed-out non-interactive widgets.

I would be of great help if you could help me with this issue.

Thank you,

Harshithraj P

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.
692 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Harshithraj1871 1,421 Reputation points


    Found a solution, we can achieve by setting the opacity for the Panel element.

    Thank you

    1 person found this answer helpful.
    0 comments No comments