c# - BindingExpression path error property not found in derived class -
i confusing binding internal property of base class.
i having below classes , b , tried bind class "a" property (which internal) in xaml.
public class { internal int myproperty { { return (int)getvalue(mypropertyproperty); } set { setvalue(mypropertyproperty, value); } } // using dependencyproperty backing store myproperty. enables animation, styling, binding, etc... internal static readonly dependencyproperty mypropertyproperty = dependencyproperty.register("myproperty", typeof(int), typeof(a), new propertymetadata(0)); } public class b : { }
question :
while creating instance class datacontext set class , can bind internal property of class in xaml scenario binding property works without issues
issue:
but same scenario have created instance of class b inherits class a, datacontext set class b , cannot bind internal property of class a(from base class) , error thrown bindingexpression path error property “myproperty “not found in class b.
why scenario not works have same base class ,please share ideas this.
Comments
Post a Comment