Example #1
0
        public static void LoadCssFilesAsync(IEnumerable <ResourceFile> resourceFiles, Action callback)
        {
            List <string> urlsAsList = new List <string>();

            foreach (var resourceFile in resourceFiles)
            {
                //add the key to the dictionary and add the url to the list:
                if (!_cssFileKeys.Contains(resourceFile.Key))
                {
                    _cssFileKeys.Add(resourceFile.Key);
                    urlsAsList.Add(resourceFile.Url);
                }
            }
            INTERNAL_InteropImplementation.LoadCssFiles(urlsAsList, callback);
        }
Example #2
0
        /// <summary>
        /// Adds 'link' tags to the HTML page and waits for the CSS files to finish loading.
        /// </summary>
        /// <param name="urls">The URL of the CSS files, with the syntax ms-appx:///AssemblyName/Folder/FileName.css or /AssemblyName;component/Folder/FileName.css</param>
        /// <param name="callback">The method that is called when the CSS files have finished loading.</param>
        public static void LoadCssFilesAsync(IEnumerable <string> urls, Action callback)
        {
            List <string> urlsAsList = (urls is List <string>?(List <string>)urls : new List <string>(urls));

            INTERNAL_InteropImplementation.LoadCssFiles(urlsAsList, callback);
        }