1
In a certain function of the .cs in C# need to change the color of the edge of a TextBox.
In my xaml have the TextBox
<TextBox Name="txtResult" Text="resultado"/>
And in the cs have the 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?