Problem Displaying a usercontrol inside another usercontrolProblem Displaying a usercontrol inside another usercontrol
Old forum URL: forums.lhotka.net/forums/t/8451.aspx
ambreshgaur posted on Monday, February 01, 2010
Im writing a silverlight project using CSLA & MVVM ...... Before using Model View View Model ...I had no problem diaplaying a control inside another control ...say for instance ...ParentUserCotrol.NewControl(new TestPage());....works fine without MVVM ...but after I followed MVVM this statement gives me following error .....
Type 'System.Windows.UIElement' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
Any help is appreciatedCopyright (c) Marimer LLC