首先的问题是,如何打开本地的html,代码入下
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
if (false == isoStore.FileExists(“HTMLPage1.htm“))
{
StreamResourceInfo sr = Application.GetResourceStream(new Uri(“HTMLPage1.htm“, UriKind.Relative));
using (BinaryReader br = new BinaryReader(sr.Stream))
{
byte[] data = br.ReadBytes((int)sr.Stream.Length);
using (BinaryWriter bw = new BinaryWriter(isoStore.CreateFile(“HTMLPage1.htm“)))
{
bw.Write(data);
bw.Close();
}
}
}
意思就是说,你要在IsolatedStorageFile(独立保存空间)中新建一个HTMLPage1.htm
[......]
