Posts

Showing posts from August, 2011

Windows Phone 7 : IsolatedStorage Save and Read Data to a File

Windows Phone 7 apps runs in an isolated environment and often application needs store and retrieve data from files. Application can use its IsolatedStorage to store and retrieve data. The example shows how to read from a  file and display it in ListBox and save data to the file located in its isolated storage. We need the class to create a structure for UI data binding. //Creating the structure to display public class MyDataClass { public string MSG { get ; set ; } } After that define the UI look, < ListBox Background = " White " x:Name = " lstDisplay " Grid.Row = " 1 " > < ListBox.ItemTemplate > < DataTemplate > < StackPanel > < TextBlock FontSize = " 20 " Foreground = " Black " Text = " {Binding Path=MSG} " > </ TextBlock > < TextBlock Foreground = " Black " Text = " --- " > ...