For me this problem occured with VS2012 and WP7 project!
So I explained my project was a simple soundboard.
This soundoard is just composed by a ListBox, and the datatemplate is composed by two buttons and one textbox.
When I build the project and I run it to the emulator
- It tooks a lot of time to load and run
- Buttons and text filed are empty
Just by looking at the output windows, I had this message
"System.Windows.Data Error: Cannot get 'Description' value (type 'System.String') from 'BoardField' (type 'BoardField'). BindingExpression: Path='Description' DataItem='BoardField' (HashCode=84854501); target element is 'System.Windows.Controls.TextBlock' (Name=''); target property is 'Text' (type 'System.String').. System.MethodAccessException: Attempt to access the method failed: .BoardField.get_Description()
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.RuntimePropertyInfo.InternalGetValue(PropertyInfo thisProperty, Object obA first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
A first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
A first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
A first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
A first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
The program '[247333058] TaskHost.exe: Managed' has exited with code 0 (0x0)."
So, it seems that there is an accesibility problem.. By reading the info coming from this exception. It looks like it came from the class that contains data. Here is the class that cause problem
Code:
Just by adding the accessor "public"
Code:
So it seems that the for a WP7 project on WS2012 has wrong settings at project start.
Good Work