How to create login form in windows phone 8.1
I need the sample code for login page for windows phone 8.1 developing
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Selva GanapathyPosted Nov 27, 2014, 12:02 AM
Hi Suganya,
Here I attached a simple sample for Windows Phone 8.1 login. Please user the following hard coded value for user name and password
UserName = "Tamil"
Pass Word = "Tamil"
Code used
private void Button_Click(object sender, RoutedEventArgs e)
{
this.login.Visibility = this.exit.Visibility = this.userName1.Visibility = this.userName.Visibility = this.passWord1.Visibility = this.passWord.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
this.messageBlock.Text = "Thank you";
this.messageBlock.Margin = new Thickness(0);
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
if(this.userName.Text =="Tamil" || this.passWord.Text =="Tamil")
{
if(this.userName.Text =="Tamil" && this.passWord.Text =="Tamil")
{
this.login.Visibility = this.exit.Visibility = this.userName1.Visibility = this.userName.Visibility = this.passWord1.Visibility = this.passWord.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
this.messageBlock.Text = "Welcome to Enchanting Tamil Nadu";
this.messageBlock.Margin = new Thickness(0);
}
else if(this.userName.Text !="Tamil")
{
this.messageBlock.Text = "User is wrong";
}
else
{
this.messageBlock.Text = "Password is wrong";
}
}
else
{
this.messageBlock.Text = "UserName and Password are wrong";
}
}
private void userName_TextChanged(object sender, TextChangedEventArgs e)
{
this.messageBlock.Text = string.Empty;
}
Regards,
Selva Ganapathy K