Exemple #1
0
        private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
        {
            var selectedText = TestNameComboBox.GetSelectedText();

            // This group of tests is separate as it requires manual control of MaterialSetupHelper flags
            switch (selectedText)
            {
            case "AcrylicAlwaysUseFallback": RunAcrylicAlwaysUseFallback(); return;

            case "HideAndShowWindow": RunHideAndShowWindow(); return;
            }

            using (var setup = new MaterialSetupHelper())
            {
                switch (selectedText)
                {
                case "BasicAcrylicOnRectangle": RunBasicAcrylicOnRectangle(); break;

                case "AcrylicPropertyChanges": RunAcrylicPropertyChanges(); break;

                case "VerifyDisconnectedState": RunVerifyDisconnectedState(); break;

                case "AcrylicCreatedInFallbackMode": RunAcrylicCreatedInFallbackMode(); break;

                case "VerifyOpaqueTintOptimization": RunVerifyOpaqueTintOptimization(); break;

                case "TintTransitionDuration": RunTintTransitionDuration(); break;

                case "AcrylicNoiseCache": RunAcrylicNoiseCache(); break;

                case "VerifyAcrylicBrushEffect": RunVerifyAcrylicBrushEffect(); break;
                }
            }
        }
Exemple #2
0
        private void RunTestButton_Clicked(object sender, RoutedEventArgs e)
        {
            using (var setup = new MaterialSetupHelper())
            {
                // Initialize local references to Page.Resources overrides for the RevealBrushes we'll use
                _resourceButtonRevealBackgroundBrush        = Resources["ButtonRevealBackground"] as RevealBackgroundBrush;
                _resourceButtonRevealBackgroundPointerOver  = Resources["ButtonRevealBackgroundPointerOver"] as RevealBackgroundBrush;
                _resourceButtonRevealBackgroundPressed      = Resources["ButtonRevealBackgroundPressed"] as RevealBackgroundBrush;
                _resourceButtonRevealBorderBrush            = Resources["ButtonRevealBorderBrush"] as RevealBorderBrush;
                _resourceButtonRevealBorderBrushPointerOver = Resources["ButtonRevealBorderBrushPointerOver"] as RevealBorderBrush;
                _resourceButtonRevealBorderBrushPressed     = Resources["ButtonRevealBorderBrushPressed"] as RevealBorderBrush;

                // Apply reveal styles
                RevealButton.Style       = Application.Current.Resources["ButtonRevealStyle"] as Style;
                RevealRepeatButton.Style = Application.Current.Resources["RepeatButtonRevealStyle"] as Style;
                RevealToggleButton.Style = Application.Current.Resources["ToggleButtonRevealStyle"] as Style;
                LargeButton.Style        = Application.Current.Resources["ButtonRevealStyle"] as Style;
                NarrowButton.Style       = Application.Current.Resources["ButtonRevealStyle"] as Style;

                switch (TestNameComboBox.GetSelectedText())
                {
                case "RevealAlwaysUseFallback":
                {
                    RunRevealAlwaysUseFallback();
                    break;
                }
                }
            }
        }