How to create login form in windows phone 8.1
I need the sample code for login page for windows phone 8.1 developing
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Selva GanapathyRank #560 · 4.3K reputationPosted Nov 26, 2014, 7:02 PM EST
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