Introduced
Unique storage for Windows Phone 7.5 (SDK 7.1)
Overview
Read/write demo for isolated storage
A quick way to read/write Key/value form data to isolated storage
Example
1. Overview
Summary.xaml
<phone: PhoneApplicationPage
x: Class = "Demo.IsolatedStorageDemo.Summary"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
xmlns: phone = "clr-namespace: Microsoft.Phone.Controls; assembly = Microsoft.Phone"
xmlns: shell = "clr-namespace: Microsoft.Phone.Shell; assembly = Microsoft.Phone"
xmlns: d = "http://schemas.microsoft.com/expression/blend/2008"
xmlns: mc = "http://schemas.openxmlformats.org/markup-compatibility/2006"
FontFamily = "{StaticResource PhoneFontFamilyNormal}"
FontSize = "{StaticResource PhoneFontSizeNormal}"
Foreground = "{StaticResource PhoneForegroundBrush}"
SupportedOrientations = "Portrait" Orientation = "Portrait"
mc: Ignorable = "d" d: DesignHeight = "768" d: DesignWidth = "480"
shell: SystemTray.IsVisible = "True">
<Grid x: Name = "LayoutRoot" Background = "Transparent">
<ScrollViewer>
<TextBlock TextWrapping = "Wrap">
<Run> Isolated Storage overview </ Run>
<LineBreak />
<LineBreak />
<Run> Isolated storage through IsolatedStorageFile operation; data in the form of key / value can be easily operated in independent storage through IsolatedStorageSettings </ Run>
<LineBreak />
<LineBreak />
<Run> Special purpose folder in independent storage </ Run>
<LineBreak />
<Run> 1, Shared / Media-Save album art </ Run>
<LineBreak />
<Run> 2 、 Shared / ShellContent-save the background image of the tile </ Run>
<LineBreak />
<Run> 3. Shared / Transfers-upload / download data for saving background transfer tasks </ Run>
<LineBreak />
<LineBreak />
<Run> The use of the independent storage resource manager, the tool is located at the address C: \ Program Files \ Microsoft SDKs \ Windows Phone \ v7.1 \ Tools \ IsolatedStorageExplorerTool \ ISETool.exe </ Run>
<LineBreak />
<Run> 1. Display the directory and file list under the root directory ISETool.exe dir xd 0fb9e5a3-d4e0-4b0f-b56e-a347bfda0480 (id is ProductId, which can be found in WMAppManifest.xml) </ Run>
<LineBreak />
<Run> 2. Display the directory and file list under the specified directory ISETool.exe dir: "Folder" xd 0fb9e5a3-d4e0-4b0f-b56e-a347bfda0480 </ Run>
<LineBreak />
<Run> 3. Copy data from independent storage to computer ISETool.exe ts xd 0fb9e5a3-d4e0-4b0f-b56e-a347bfda0480 "C: \ MyData" (a subdirectory named IsolatedStore will be created in this directory)
</ Run>
<LineBreak />
<Run> 4. Copy data from computer to independent storage ISETool.exe rs xd 0fb9e5a3-d4e0-4b0f-b56e-a347bfda0480 "C: \ MyData \ IsolatedStore" </ Run>
<LineBreak />
<LineBreak />
<Run> In the scenario of multi-threaded operation of independent storage, it is recommended to use a mutex, that is, System.Threading.Mutex </ Run>
<LineBreak />
<LineBreak />
<Run> Tips: appdata: / represents the package; isostore: / represents independent storage. Default is independent storage </ Run>
</ TextBlock>
</ ScrollViewer>
</ Grid>
</ phone: PhoneApplicationPage>