I try to persist XamGrid in a button and restore it in userccontrol constructor. It is fine when I have data for the Xamgrid(for example, ItemSource).
But if there is no data for XamGrid, restore xamgrid from storage will crash the app.
Possible it is a bug. Help please.
Hi Ben,
Was there an exception that was thrown? Can you post what the exception was that caused the crash?
When something is wrong, the screen is become white screen, it's kind of null object exception but SL reported it as 4004. Will try to reproduce it in a sample project.
If you're using Internet Explorer, towards the bottom of the window you should see an orange colored shield symbol appear. If you click on that, a dialog window should open and it should have the exception information in there.
Alternatively you can enable common runtime language exceptions in visual studio so that the exception will trigger inside visual studio so it can be debugged. In Visual Studio, go to Debug -> Exceptions. A dialog window will open and inside the dialog you will see an entry for Common Language Runtime Exceptions. Next to it will be a checkbox under the "Thrown" column. Make sure this checkbox is checked. Next time you run your application, perform the steps to cause the exception and it should break inside Visual Studio so you can see the actual exception.
Thank you. Even turn on all exception in VS, still can't get it when debugging. Because it is not JS exception, so also orange colored shield symbol appear in IE with white blank screen. The screen shot as below:
I've tried to reproduce this in my sample but so far I'm not having any luck. I've tried restoring the state when the grid was bound to an empty collection as well as not bound to anything and the grid restores as expected with no crashes. Can you provide a sample that reproduces the issue you're seeing?
Do you still require assistance on this issue?