WPF two-way binding with internal setter -
i'm using wpf's two-way binding on clr property, implements inotifypropertychanged. set
property internal
, while get
public
.
unfortunately, following error:
system.windows.markup.xamlparseexception unhandled message: unhandled exception of type 'system.windows.markup.xamlparseexception' occurred in presentationframework.dll additional information: twoway or onewaytosource binding cannot work on read-only property 'name' of type 'mytype'.
is expected behavior? have thought internal setters should work fine... note clr-type defined in assembly, , visible in current assembly, [assembly: internalsvisibleto("myassembly")]
attribute.
does have workarounds/suggestions? declaring assembly class library, it's not option me change set
public
.
you can create own new public wraper property , use getter , setter of interact internal property
internal string _sidetabheader; public string sidetabheader { { return _sidetabheader; } set { if( value<0) { nothing } else { _sidetabheader=value; }; } }
Comments
Post a Comment