Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Complete newb with C#
#4
Code:
private void ProductName_TextChanged(object sender, TextChangedEventArgs e)
{
    lblCharactersLeft.Content = (ProductName.MaxLength - ProductName.Text.Length).ToString();
}
Try this. Apparently in XAML, labels use .Content instead of .Text, and the event is TextChangedEventArgs e instead of a generic EventArgs e.

What compiler/editor are you using, Fiel?
Reply


Messages In This Thread
Complete newb with C# - by Fiel - 2009-10-18, 06:32 PM
Complete newb with C# - by JoeTang - 2009-10-18, 09:50 PM
Complete newb with C# - by Spaz - 2009-10-18, 10:58 PM
Complete newb with C# - by JoeTang - 2009-10-18, 11:34 PM
Complete newb with C# - by Fiel - 2009-10-19, 07:15 AM
Complete newb with C# - by JoeTang - 2009-10-19, 08:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)