예제 #1
0
        /// <summary/>
        protected void VerifySerialization(Visual content)
        {
            if (verifySerialization)
            {
                Log("");
                Log("Round tripping the Visual...");

                object roundTrippedContent = SerializationTest.RoundTrip(content);
                if (!ObjectUtils.DeepEqualsToAnimatable(content, roundTrippedContent))
                {
                    AddFailure("Round tripping this Visual failed");
                }
            }
        }
예제 #2
0
        private Viewport3D GetViewport3DFromXamlFile()
        {
            FrameworkElement root = (FrameworkElement)SerializationTest.ParseXaml(filename);

            if (!(root is Viewport3D))
            {
                root = GetViewport3DFromFrameworkElement(root);
            }
            if (root == null)
            {
                throw new ApplicationException("Could not find Viewport3D in " + filename);
            }
            return((Viewport3D)root);
        }