public void TestApplyStyleInLocalResourcesNone()
        {
            BasicScenario userControl = new BasicScenario();
            ImplicitStyleManager.SetApplyMode(userControl.panel, ImplicitStylesApplyMode.None);

            TestAsync(
               userControl,
               () => Assert.IsInstanceOfType(userControl.btn.Foreground, typeof(SolidColorBrush)),
               () => Assert.AreEqual(Colors.Black, ((SolidColorBrush)userControl.btn.Foreground).Color),
               () => Assert.IsNull(userControl.btn.Style));
        }
        public void TestApplyStyleInLocalResourcesAuto()
        {
            BasicScenario userControl = new BasicScenario();
            Button childButton = new Button();

            ImplicitStyleManager.SetApplyMode(userControl.panel, ImplicitStylesApplyMode.Auto);

            TestAsync(
               userControl,
               () => Assert.IsInstanceOfType(userControl.btn.Foreground, typeof(SolidColorBrush)),
               () => Assert.AreEqual(Colors.Red, ((SolidColorBrush)userControl.btn.Foreground).Color),
               () => Assert.IsNotNull(userControl.btn.Style),
               () => userControl.btn.Content = childButton,
               () => Assert.AreEqual(Colors.Red, ((SolidColorBrush)childButton.Foreground).Color),
               () => Assert.IsNotNull(childButton.Style));
        }