# Windows Phone 7: application development caveat with ViewModel entity class

> Common pitfall in WP7 development with ViewModel and entity classes. Avoid this mistake for proper MVVM data binding.

*Published August 26, 2011* · Categories: net, microsoft, windows-phone-7

Source: https://www.kimpel.com/2011/08/26/windows-phone-7-application-development-caveat-with-viewmodel-entity-class/


The other day I played around with the newest release of the Windows Phone 7 SDK (7.1 Beta 2) and started by using the base application template. I created a new class that serves as the entity definition for the view model. The data is bound to a list box. Nothing spectacular.

In design time (Visual Studio) my static sample data that I created showed up just fine. During application start I created some "real" data and bound it to the list box. As a result, the list box is empty and does not show any data at all ... no exceptions or other runtime errors. After a bit of testing I found out that the problem is with the entity class definition. The class was specified to be private instead of public. This little keyword led to an empty list box.

