xaml - Silverlight Usercontrol clr namespace -
i'm building silverlight mvvm app (using galasoft mvvm light template). app has usercontrols. have stumbeld across somthing seems namespace issue. namespaces defined in way:
myapp.controls -> user controls myapp.view -> different pages of app (which use user controls) myapp -> namespace of main page (root namespace) this works ok long don't give of usercontrols x:name. x:name defined, build breaks following message:
error cs0426: type name 'controls' not exist in type 'myapp.myapp' that realy strange! can resolve issue changing namespace myapp.controls myappcontrols or manipulating generated code, direct reference myapp.controls.mycontrol replaced using myapp.controls , instanciate control mycontrol (however overwritten again, switch desgin view).
does know reason strange behaviour? have expected common problem?
i think found reason: had resource file name myapp. led generation of class myapp , therefore compiler got confused between class myapp , namespace myapp. have renamed resource file different , project compiles again.
Comments
Post a Comment