コード例 #1
0
 /// <summary>
 /// All code related to loading data when app starts
 /// </summary>
 /// <param name="e"></param>
 /// <returns></returns>
 private static void EnsureWindow()
 {
     // Load all lists since we will need them anyway
     // This must block as the app can not resume without this data being loaded
     IconItemSource.LoadIconsList();
     SystemColorsItemSource.LoadSystemColors();
     SystemBrushItemSource.LoadSystemBrushes();
     UniversalPlatformVersionSource.LoadWindowsVersionContracts();
 }
コード例 #2
0
        public void FiltersCorrectly()
        {
            SystemColorsItemSource systemColorSource = new SystemColorsItemSource();

            string colorName = "SystemAccentColorLight1";

            systemColorSource.Filter(colorName);

            Assert.IsTrue(0 < systemColorSource.FilteredItems.Count);
            foreach (SystemColor color in systemColorSource.FilteredItems)
            {
                Assert.AreEqual(colorName, color.Key);
            }
        }
コード例 #3
0
        public static async Task ClassInitialize(TestContext context)
        {
            if (context is null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            context.WriteLine("Load theme resources");
            // We need the UI thread since we use the XAML loader
            await CoreApplication.MainView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Low, () =>
            {
                SystemColorsItemSource.LoadSystemColors();
            });
        }