コード例 #1
0
        public void ConvertFrom_Finds_Attached_Property()
        {
            var target = new PerspexPropertyTypeConverter();
            var context = CreateContext();
            var result = target.ConvertFrom(context, null, "AttachedOwner.Attached");

            Assert.Equal(AttachedOwner.AttachedProperty, result);
        }
コード例 #2
0
        public void ConvertFrom_Finds_Fully_Qualified_Property()
        {
            var target = new PerspexPropertyTypeConverter();
            var context = CreateContext();
            var result = target.ConvertFrom(context, null, "Class1.Foo");

            Assert.Equal(Class1.FooProperty, result);
        }
コード例 #3
0
        public void ConvertFrom_Uses_Selector_TargetType()
        {
            var target = new PerspexPropertyTypeConverter();
            var style = new Style(x => x.OfType<Class1>());
            var context = CreateContext(style);
            var result = target.ConvertFrom(context, null, "Foo");

            Assert.Equal(Class1.FooProperty, result);
        }