/// <summary> /// Adds a 'link' tag to the HTML page and waits for the CSS file to finish loading. /// </summary> /// <param name="url">The URL of the CSS file, with the syntax ms-appx:///AssemblyName/Folder/FileName.css or /AssemblyName;component/Folder/FileName.css</param> /// <returns>Nothing</returns> public static Task <object> LoadCssFile(string url) { var t = new TaskCompletionSource <object>(); INTERNAL_InteropImplementation.LoadCssFile(url, () => t.SetResult(null)); return(t.Task); }
public static Task <object> LoadCssFile(ResourceFile resourceFile) { if (!_cssFileKeys.Contains(resourceFile.Key)) { var t = new TaskCompletionSource <object>(); INTERNAL_InteropImplementation.LoadCssFile(resourceFile.Url, () => t.SetResult(null)); _cssFileKeys.Add(resourceFile.Key); return(t.Task); } var task = new TaskCompletionSource <object>(); task.SetResult(null); return(task.Task); }