In a given code function of .cs
in C#
I need to change the border color of a TextBox
.
In my xaml
I have TextBox
<TextBox Name="txtResult" Text="resultado"/>
And in cs
I have validation
private void btnOk_Click(object sender, RoutedEventArgs e)
{
if (int.Parse(txtResult.Text) == 1){
//mudar a cor da borda para verde
} else {
//mudar a cor da borda para vermelho
}
}
How can I make this change?