Reputation: 3755
Hello guys i'm facing a isolated exception when trying to edit my UI
it says
Unable to determine application identity of the caller. at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type appEvidenceType) at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type applicationEvidenceType)at "CLASS FILE NAME.cs"
when i try to do this
<data:scheduledItems x:Key="alarmCollection" />
</phone:PhoneApplicationPage.Resources>
i use it to bind data. It can work but i cant do anything to my design view
Thanks!
Upvotes: 1
Views: 895
Reputation: 3996
You can't access the Isolated storage from Visual studio.
You need to add a check for DesignerProperties.IsInDesignTool
in the code behind....
if (!DesignerProperties.IsInDesignTool)
{
schedulesItems = IsolatedStorageSettings.ApplicationSettings;
}
Upvotes: 1
Reputation: 950
It appears to me that Visual Studio is trying to retrieve the data from isolated storage, but it can't because it's Visual Studio and not your application. It makes sense if you think about it - the isolated storage is only created once the application is deployed to Windows Phone and not before that. It's not available in the design view.
If you want to actually have this data displayed in design view, you can't. But you can check to see if the design view is attached and avoid trying to access isolated storage that way.
using System.ComponentModel;
...
if (DesignerProperties.IsInDesignView)
{
// return dummy data for the design view
}
else
{
// grab data from isolated storage
}
Upvotes: 3