public static void RunOnMainThread(this Window _, Priority priority, Action action) { Threads.AddIdle((int)priority, () => { action(); return(GSourceRemove); }); }