/// <summary> /// Runs the main Xwt GUI thread. /// </summary> /// <remarks> /// Blocks until the main GUI loop exits. Use <see cref="Application.Exit"/> /// to stop the Xwt application. /// </remarks> public static void Run() { if (XwtSynchronizationContext.AutoInstall) { if (SynchronizationContext.Current == null || (!((engine.IsGuest) || (SynchronizationContext.Current is XwtSynchronizationContext)))) { SynchronizationContext.SetSynchronizationContext(new XwtSynchronizationContext()); } } toolkit.InvokePlatformCode(delegate { engine.RunApplication(); }); }
public static void Run() { toolkit.InvokePlatformCode(delegate { engine.RunApplication(); }); }