Different Windows Phone (6) Isolated Storage (Isolated storage)

Source: Internet
Author: User
Tags mutex xmlns root directory


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> 




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.