Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can enable or disable checkbox based on textbox value ? if textbox value greater than zero then enable checkbox else disable checkbox . how can write style trigger for this ? (is there any alternate method ?)
Posted
Updated 27-Nov-12 17:05pm
v2

1 solution

C#
private void textBox1_TextChanged(object sender, TextChangedEventArgs e)
{
    if (textBox1.Text.Length > 0)
        checkBox1.IsEnabled = true;
    else
        checkBox1.IsEnabled = false;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900