예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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());
        }
예제 #4
0
        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");
        }
예제 #5
0
        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");
        }