This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Button Content="Save single object data" HorizontalAlignment="Left" Margin="30,23,0,0" VerticalAlignment="Top" Width="392" Click="Save_single_object_button_click"/> | |
<Button Content="Read single object data" HorizontalAlignment="Left" Margin="30,114,0,0" VerticalAlignment="Top" Width="392" Click="Read_single_object_button_click"/> | |
<Button Content="Save composite object data" HorizontalAlignment="Left" Margin="42,256,0,0" VerticalAlignment="Top" Width="380" Click="Save_composite_object_button_click"/> | |
<Button Content="Read composite object data" HorizontalAlignment="Left" Margin="42,348,0,0" VerticalAlignment="Top" Width="380" Click="Read_composite_object_click"/> | |
<TextBlock x:Name="Displayblock" HorizontalAlignment="Left" Margin="42,496,0,0" TextWrapping="Wrap" Text="Display data Textblock" VerticalAlignment="Top" Height="101" Width="380" FontSize="26"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For single object data such as string | |
private void Save_single_object_button_click(object sender, RoutedEventArgs e) | |
{ | |
//Declare the instance of Isolated Storage settings | |
var settings = IsolatedStorageSettings.ApplicationSettings; | |
//add a key value pair with key name and value chetan | |
settings.Add("name", "Chetan"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Sample class for composite object | |
public class Resultclass | |
{ | |
public string name { get; set; } | |
public int marks { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void Save_composite_object_button_click(object sender, RoutedEventArgs e) | |
{ | |
//Data object to be saved | |
Resultclass obj = new Resultclass(); | |
obj.name = "Vivek"; | |
obj.marks = 98; | |
//Declare the instance of Isolated Storage settings | |
var settings = IsolatedStorageSettings.ApplicationSettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For single object data such as string | |
private void Save_single_object_button_click(object sender, RoutedEventArgs e) | |
{ | |
//Declare the instance of Isolated Storage settings | |
var settings = IsolatedStorageSettings.ApplicationSettings; | |
if (!settings.Contains("name")) | |
{ | |
//add a key value pair with key name and value chetan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO.IsolatedStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Declare the instance of Isolated Storage settings | |
var settings = IsolatedStorageSettings.ApplicationSettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var settings = Windows.Storage.ApplicationData.Current.LocalSettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> | |
<StackPanel> | |
<CheckBox Name="applock" Foreground="Black" Background="WhiteSmoke" Content="App Lock" Checked="applock_Checked"/> | |
<TextBox Name="old_pin" Visibility="Collapsed" InputScope="Number" Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="1" Height="84" KeyUp="txt_KeyUp"/> | |
<StackPanel Name="setpw" Visibility="Collapsed"> | |
<TextBox Name="pin" InputScope="Number" Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="1" Height="84" KeyUp="txt_KeyUp"/> | |
<TextBox Name="confirm_pin" InputScope="Number" Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="1" Height="84" KeyUp="txt_KeyUp"/> | |
</StackPanel> | |
</StackPanel> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RadToggleSwitch_CheckedChanged(object sender, Telerik.Windows.Controls.CheckedChangedEventArgs e) | |
{ | |
Telerik.Windows.Controls.RadToggleSwitch swtch = (Telerik.Windows.Controls.RadToggleSwitch)sender; | |
if (swtch.IsChecked == true) | |
{ | |
if (App.islocked) | |
{ | |
old_pin.Visibility = Visibility.Visible; | |
setpw.Visibility = Visibility.Visible; | |
} |