Relative Content

Tag Archive for c#user-interfacewinui-3winuiwinui-xaml

Controls going invisible when changing background color of canvas in WinUI 3

I’ve recently started to use WinUI 3 and have an issue with changing the backcolor of a canvas. Coming from WPF, I was used that simply changing the Background property works. This however, results in everything inside the canvas becoming invisible until clicked or otherwise interacted with. When no background property is set, everything works fine, except the background is colored based on my windows design setting, which is not what I want. This doesn’t only affect canvasses, but also stackpanels, grids and so on.