public void FiltersCorrectly()
        {
            SystemBrushItemSource systemBrushSource = new SystemBrushItemSource();

            string brushName   = "SystemControlBackgroundAccentBrush";
            string correctXAML = SystemBrushDefinitionFactory.SolidColorBrushDefinition("SystemControlBackgroundAccentBrush", "{ThemeResource SystemAccentColor}");

            systemBrushSource.Filter(brushName);

            Assert.IsTrue(0 < systemBrushSource.FilteredItems.Count);
            foreach (SystemBrush brush in systemBrushSource.FilteredItems)
            {
                Assert.AreEqual(brushName, brush.Key);
                Assert.AreEqual(correctXAML, brush.XAMLDefinition);
            }
        }
Example #2
0
 private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs args)
 {
     source.Filter((sender as TextBox).Text);
 }