public void VerifyVisualTreeExampleForLightTheme() { if (!PlatformConfiguration.IsOsVersion(OSVersion.Redstone5)) { return; } var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> </Grid>"; UIElement root = VisualTreeTestHelper.SetupVisualTree(xaml); VisualTreeTestHelper.VerifyVisualTree(root: root, masterFilePrefix: "VerifyVisualTreeExampleForLightTheme", theme: Theme.Light); }
public void VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName() { if (!PlatformConfiguration.IsOsVersion(OSVersion.Redstone5)) { return; } var xaml = @"<Grid Width='400' Height='400' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> </Grid>"; UIElement root = VisualTreeTestHelper.SetupVisualTree(xaml); RunOnUIThread.Execute(() => { (root as FrameworkElement).RequestedTheme = ElementTheme.Dark; }); VisualTreeTestHelper.VerifyVisualTree(root: root, masterFilePrefix: "VerifyVisualTreeExampleLoadAndVerifyForDarkThemeWithCustomName"); }