private void UserNameSaveIcon_OnTapped(object sender, TappedRoutedEventArgs e)
{
var localData = ApplicationData.Current.LocalSettings;
var roamData = ApplicationData.Current.RoamingSettings;
if (!localData.Values.ContainsKey("UserName") && !roamData.Values.ContainsKey("UserName"))
{
localData.Values.Add("UserName", UserNameTextBox.Text);
roamData.Values.Add("UserName", UserNameTextBox.Text);
}
else
{
localData.Values.Remove("UserName");
roamData.Values.Remove("UserName");
localData.Values.Add("UserName", UserNameTextBox.Text);
roamData.Values.Add("UserName", UserNameTextBox.Text);
}
UserNameEditIcon.Visibility = Visibility.Visible;
UserNameSaveIcon.Visibility = Visibility.Collapsed;
UserNameTextBox.Visibility = Visibility.Collapsed;
UserNameTextBlock.Visibility = Visibility.Visible;
UserNameTextBlock.Text = UserNameTextBox.Text;
var cspvm = new CallandSettingsPageViewModel();
cspvm.UserNameSaver(UserNameTextBlock.Text);
}