CompositorTryGetDefaultCompositor Method
Attempts to get the Compositor instance that will be used by default for new TopLevels
created by the current platform backend.
This won't work for every single platform backend and backend settings, e. g. with web we'll need to have
separate Compositor instances per output HTML canvas since they don't share OpenGL state.
Another case where default compositor won't be available is our planned multithreaded rendering mode
where each window would get its own Compositor instance
This method is still useful for obtaining GPU device LUID to speed up initialization, but you should
always check if default Compositor matches one used by our control once it gets attached to a TopLevel
Namespace: Avalonia.Rendering.CompositionAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static Compositor? TryGetDefaultCompositor()
Public Shared Function TryGetDefaultCompositor As Compositor
static member TryGetDefaultCompositor : unit -> Compositor
Return Value
Compositor