Following this c++ example i'm trying to create a custom brush in a WinUI 3 desktop application but i cannot find out how to get a compositor instance from within the OnConnected Method. The example uses
Microsoft::UI::Xaml::Window::Current().Compositor()
but Current (and CoreWindow) are always null for desktop apps.
How can i get the compositor instance needed to create brushes?