예제 #1
0
        public void FindContextAtElementStart()
        {
            XamlExpressionContext c = GetXamlContext("<Window><");

            Assert.AreEqual(0, c.ElementPath.Elements.Count);
            Assert.IsNull(c.AttributeName);
            Assert.IsFalse(c.InAttributeValue);
        }
예제 #2
0
        public void FindContextAfterElementName()
        {
            XamlExpressionContext c = GetXamlContext("<Window><Grid");

            Assert.AreEqual(2, c.ElementPath.Elements.Count);
            Assert.AreEqual("Window > Grid", c.ElementPath.ToString());
            Assert.IsNull(c.AttributeName);
            Assert.IsFalse(c.InAttributeValue);
        }