Posted by: Harry Kimpel | August 26, 2011

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.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.