TryGetDefaultCompositor 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
Definition
Namespace: Avalonia.Rendering.Composition
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Compositor? TryGetDefaultCompositor()
Public Shared Function TryGetDefaultCompositor As Compositor
static member TryGetDefaultCompositor : unit -> Compositor