public void VerifyVisualTreeExampleLoadAndVerifyForAllThemes() { 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>"; VisualTreeTestHelper.VerifyVisualTree(xaml: xaml, masterFilePrefix: "VerifyVisualTreeExampleLoadAndVerifyForAllThemes", theme: Theme.All); }
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 VerifyVisualTreeExampleWithCustomerPropertyValueTranslator() { 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'> <TextBlock Text='Abc' /> </Grid>"; VisualTreeTestHelper.VerifyVisualTree(xaml: xaml, masterFilePrefix: "VerifyVisualTreeExampleWithCustomerPropertyValueTranslator", translator: new CustomizedTranslator()); }
public void VerifyVisualTreeForAppBarAndAppBarToggleButton() { 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'> <StackPanel> <AppBarButton Icon='Accept' Label='Accept'/> <AppBarToggleButton Icon='Dislike' Label='Dislike'/> </StackPanel> </Grid>"; VisualTreeTestHelper.VerifyVisualTree(xaml: xaml, masterFilePrefix: "VerifyVisualTreeForAppBarAndAppBarToggleButton"); }
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"); }