Thursday, March 26, 2009

Isolated stroage

The Isolated stroage is a virtual path, user can need to know where the path and where the file is located. The Framework has separate path for the isolated stroage. This path differ base on the operating system.


using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
store.CreateDirectory("Dir1");
IsolatedStorageFileStream file = store.CreateFile("Hello.xml");
file.Close();
using (StreamWriter sw = new StreamWriter(store.OpenFile("Hello.xml", FileMode.Open, FileAccess.Write)))
{
sw.WriteLine("");
sw.WriteLine("Hello Welcome");
sw.WriteLine("
");
}

using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream("Hello.xml", FileMode.Open, isoStore))
{
XDocument doc1 = XDocument.Load(isoStream);
TextBox1.Text = doc1.ToString();
}
}
}

In the above code Isolated storage stores are represented by the IsolatedStorageFile object. There's a static method of this object that you can use to obtain the store for the current Application. The IsolatedStorageFile object implements a CreateDirectory method that you can use to create directories called Dir1. Then using the StreamWriter the xml file is create and the xml is added to the “Hello.xml” now we store the xml in the isolated storage.

To retrieve the stored xml file from the isolated storage we are using the IsolatedStorageFileStream. IsolatedStorageFileStream class has several overloaded constructors, in that we are pass in the xml filename, file mode as open, and IsolatedStorageFile object that represents the store where this file will be located.
We are loading the XDocument object and assign the value to the Textbox.

To Get more Check the Below link

http://msdn.microsoft.com/en-us/library/3ak841sy(VS.80).aspx
http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.aspx
http://msdn.microsoft.com/en-us/library/8dzkff1s(VS.80).aspx
http://msdn.microsoft.com/en-us/library/bdts8hk0(VS.80).aspx
http://msdn.microsoft.com/en-us/library/k3352a4t(VS.80).aspx

What new in Silverlight3.0

The silverlight 3.0 have following Features

1) media enhancements.
2) out of browser support allowing Web applications to work on the desktop.
3) significant graphics improvements including 3D graphics support.
4) GPU acceleration and H.264 video support.

Apart from this there is also New Features in Expression Blend 3
Like

  1. SketchFlow.
  2. Adobe Photoshop and Illustrator import.
  3. Behaviors.
  4. Sample data.
  5. Improved design and development experience.

For more information See Silverlight.net page

To download Silverlight Toolkit March 2009

To download Silverlight Toolkit December 2008 change list