Class Super
public class Super
- Inheritance
-
Super
- Inherited Members
- Extension Methods
Fields
CanUseHardwareAcceleration
Can optionally disable hardware-acceleration with this flag, for example on iOS you would want to avoid creating many metal views.
public static bool CanUseHardwareAcceleration
Field Value
CapMicroSecs
Capping FPS,at 120
public static float CapMicroSecs
Field Value
CreateHttpClient
Since we removed IHttpClientFactory for faster app startup on mobile one can set this delegate to be used to create a custom client that would be used for loading internet sources.
public static Func<IServiceProvider, HttpClient> CreateHttpClient
Field Value
InitialWindowSize
public static Size InitialWindowSize
Field Value
InsetsChanged
Subscribe your navigation bar to react
public static EventHandler InsetsChanged
Field Value
IsPrerenderingEnabled
When using accelerated rendering, enables CPU pre-rendering to show content immediately while GPU initializes. Set to false to skip software pre-render (saves memory but may show blank frame during GPU init). Default is true.
public static bool IsPrerenderingEnabled
Field Value
Multithreaded
Experimental for dev use. Set OffscreenRenderingAtCanvasLevel to true when this is true. Default is False
public static bool Multithreaded
Field Value
OnMauiAppCreated
Maui App was launched and UI is ready to be consumed
public static Action OnMauiAppCreated
Field Value
PreloadRegisteredFonts
public static bool PreloadRegisteredFonts
Field Value
SendTapsOnMainThread
Used by Tapped event handler, default is false
public static bool SendTapsOnMainThread
Field Value
SkiaGeneration
public static int SkiaGeneration
Field Value
UseFrozenVisualLayers
public static bool UseFrozenVisualLayers
Field Value
Properties
App
public static IApplication App { get; set; }
Property Value
AppContext
public static IMauiContext AppContext { get; }
Property Value
BottomTabsHeight
In DP
public static double BottomTabsHeight { get; set; }
Property Value
CacheEnabled
public static bool CacheEnabled { get; set; }
Property Value
ColorAccent
public static Color ColorAccent { get; set; }
Property Value
ColorPrimary
public static Color ColorPrimary { get; set; }
Property Value
DeviceOrientation
public static DeviceOrientation DeviceOrientation { get; set; }
Property Value
DeviceRotation
Degrees
public static int DeviceRotation { get; set; }
Property Value
DeviceRotationSnap
public static int DeviceRotationSnap { get; }
Property Value
EnableRendering
public static bool EnableRendering { get; set; }
Property Value
FontSubPixelRendering
Enables sub-pixel font rendering, might provide better antialiasing on some platforms. Default is True;
public static bool FontSubPixelRendering { get; set; }
Property Value
GpuCacheEnabled
public static bool GpuCacheEnabled { get; set; }
Property Value
InBackground
public static bool InBackground { get; protected set; }
Property Value
Initialized
public static bool Initialized { get; set; }
Property Value
IsRtl
RTL support UNDER CONSTRUCTION
public static bool IsRtl { get; set; }
Property Value
MaxFps
Limits the rendering loop to this frame rate. 0 means unlimited (uses display refresh rate). on iOS this will work only in steps 60, 30, 20, 15, 12... if you set 35 ios would run at run 60. On Android you might want to set a bit higher like 35 to get around 30to and avoid never reaching 30. Can be changed at runtime on all platforms.
public static int MaxFps { get; set; }
Property Value
MaxFrameLengthMs
public static double MaxFrameLengthMs { get; set; }
Property Value
NavBarHeight
In DP
public static double NavBarHeight { get; set; }
Property Value
NavigationBarHeight
In DP, actually Android only
public static double NavigationBarHeight { get; set; }
Property Value
OffscreenRenderingAtCanvasLevel
If set to True will process all ofscreen rendering in one background thread at canvas level, otherwise every control will launch its own background processing thread. Default is False
public static bool OffscreenRenderingAtCanvasLevel { get; set; }
Property Value
Screen
public static Screen Screen { get; }
Property Value
Services
public static IServiceProvider Services { get; }
Property Value
StatusBarHeight
In DP
public static double StatusBarHeight { get; set; }
Property Value
StopRenderingInBackground
public static bool StopRenderingInBackground { get; set; }
Property Value
UserAgent
public static string UserAgent { get; set; }
Property Value
Methods
DisplayException(VisualElement, Exception)
Display xaml page creation exception
public static void DisplayException(VisualElement view, Exception e)
Parameters
viewVisualElementeException
EnqueueBackgroundTask(Func<Task>)
public static void EnqueueBackgroundTask(Func<Task> asyncAction)
Parameters
GetCurrentTimeMs()
public static long GetCurrentTimeMs()
Returns
GetCurrentTimeNanos()
public static long GetCurrentTimeNanos()
Returns
InitShared()
protected static void InitShared()
Log(LogLevel, string, string)
Logs a message at the specified level.
public static void Log(LogLevel level, string message, string caller = null)
Parameters
Log(Exception, string)
Logs an exception at Error level. If a startup logger is configured, delegates to it; otherwise falls back to Trace/Console.
public static void Log(Exception e, string caller = null)
Parameters
Log(string, LogLevel, string)
Logs a message. By convention, string-only calls are Warning level.
public static void Log(string message, LogLevel logLevel = LogLevel.Warning, string caller = null)
Parameters
NeedGlobalUpdate()
This will force recalculate canvas visibility in ViewTree and update those visible. Also when GRContext changes, all references must be cleared to avoid crash on next draw
public static void NeedGlobalUpdate()
OnCreated()
public static void OnCreated()
OnWentBackground()
public static void OnWentBackground()
OnWentForeground()
public static void OnWentForeground()
ProcessBackgroundQueue()
protected static Task ProcessBackgroundQueue()
Returns
ResizeWindow(Window, int, int, bool)
For desktop platforms, will resize app window and eventually lock it from being resized.
public static void ResizeWindow(Window window, int width, int height, bool isFixed)
Parameters
RunOnMainThreadAndWait(Action, CancellationToken)
public static void RunOnMainThreadAndWait(Action action, CancellationToken cancellationToken = default)
Parameters
actionActioncancellationTokenCancellationToken
RunOnMainThreadAndWaitAsync(Func<Task>, CancellationToken)
public static Task RunOnMainThreadAndWaitAsync(Func<Task> asyncAction, CancellationToken cancellationToken = default)
Parameters
asyncActionFunc<Task>cancellationTokenCancellationToken
Returns
SetLocale(string)
public static void SetLocale(string lang)
Parameters
langstring
SetupFrameLooper()
protected static void SetupFrameLooper()
Events
HotReload
Will be triggered only if debugger is attached
public static event Action<Type[]?>? HotReload
Event Type
NeedGlobalRefresh
This will force recalculate canvas visibility in ViewTree and update those visible. Also when GRContext changes, all references must be cleared to avoid crash on next draw
public static event EventHandler NeedGlobalRefresh
Event Type
OnNativeAppCreated
App was launched and UI is ready to be created
public static event EventHandler OnNativeAppCreated
Event Type
OnNativeAppDestroyed
public static event EventHandler OnNativeAppDestroyed
Event Type
OnNativeAppPaused
public static event EventHandler OnNativeAppPaused
Event Type
OnNativeAppResumed
public static event EventHandler OnNativeAppResumed
Event Type
OrientationChanged
public static event EventHandler<DeviceOrientation> OrientationChanged
Event Type
RotationChanged
public static event EventHandler<int> RotationChanged