Пример #1
0
        public void Write_AttachedProperty()
        {
            var obj = new AttachedWrapper();

            Attachable.SetFoo(obj, "x");
            Attachable.SetFoo(obj.Value, "y");
            try {
                Assert.AreEqual(ReadXml("AttachedProperty.xml").Trim(), XamlServices.Save(obj), "#1");
            } finally {
                Attachable.SetFoo(obj, null);
                Attachable.SetFoo(obj.Value, null);
            }
        }
Пример #2
0
        public void Read_AttachedProperty()
        {
            var obj = new AttachedWrapper();

            Attachable.SetFoo(obj, "x");
            Attachable.SetFoo(obj.Value, "y");
            try {
                var xr = new XamlObjectReader(obj);
                Read_AttachedProperty(xr);
            } finally {
                Attachable.SetFoo(obj, null);
                Attachable.SetFoo(obj.Value, null);
            }
        }