public TizenHost(Func <WinUI.Application> appBuilder, string[] args = null) { Elementary.Initialize(); Elementary.ThemeOverlay(); _current = this; _appBuilder = appBuilder; _args = args; _args ??= Environment .GetCommandLineArgs() .Skip(1) .ToArray(); bool EnqueueNative(DispatcherQueuePriority priority, DispatcherQueueHandler callback) { EcoreMainloop.PostAndWakeUp(() => callback()); return(true); } Windows.System.DispatcherQueue.EnqueueNativeOverride = EnqueueNative; Windows.UI.Core.CoreDispatcher.DispatchOverride = (d) => EcoreMainloop.PostAndWakeUp(d); Windows.UI.Core.CoreDispatcher.HasThreadAccessOverride = () => EcoreMainloop.IsMainThread; _tizenApplication = new TizenApplication(this); _tizenApplication.Run(_args); }
public TizenHost(Func <WinUI.Application> appBuilder, string[]?args = null) { Elementary.Initialize(); Elementary.ThemeOverlay(); _current = this; _appBuilder = appBuilder; Windows.UI.Core.CoreDispatcher.DispatchOverride = (d) => EcoreMainloop.PostAndWakeUp(d); Windows.UI.Core.CoreDispatcher.HasThreadAccessOverride = () => EcoreMainloop.IsMainThread; _tizenApplication = new TizenApplication(this); _tizenApplication.Run(args); }
public TizenHost(Func <WinUI.Application> appBuilder) { Elementary.Initialize(); Elementary.ThemeOverlay(); _current = this; _appBuilder = appBuilder; Windows.UI.Core.CoreDispatcher.DispatchOverride = (d) => EcoreMainloop.PostAndWakeUp(d); Windows.UI.Core.CoreDispatcher.HasThreadAccessOverride = () => EcoreMainloop.IsMainThread; _tizenApplication = new TizenApplication(this); _tizenApplication.Run(Environment.GetCommandLineArgs()); }
/// <summary> /// Creates a WpfHost element to host a Uno-Skia into a WPF application. /// </summary> /// <remarks> /// If args are omitted, those from Environment.GetCommandLineArgs() will be used. /// </remarks> public TizenHost(Func <WinUI.Application> appBuilder, string[] args = null) { Elementary.Initialize(); Elementary.ThemeOverlay(); _current = this; _appBuilder = appBuilder; _args = args; _args ??= Environment .GetCommandLineArgs() .Skip(1) .ToArray(); Windows.UI.Core.CoreDispatcher.DispatchOverride = (d) => EcoreMainloop.PostAndWakeUp(d); _tizenApplication = new TizenApplication(this); _tizenApplication.Run(_args); }