See [here](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.xamlcompositionbrushbase?view=windows-app-sdk-1.5) The code uses UWP classes, which is wrong. Also there is no `Window.Current.Compositor` in WASDK