I'm trying to perform an operation that is about once I click on a button another controller appears (rectangle) and when I click again it disappears, but for the moment it does not pay attention to me, what could it be? I leave my code here below:
private void Barrera_Loaded(object sender, RoutedEventArgs e)
{
Barrera.Visibility = Visibility.Hidden;
}
private void ActivaBarrera_Loaded(object sender, RoutedEventArgs e)
{
if (ActivaBarrera.IsEnabled)
{
Barrera.Visibility = Visibility.Visible;
}
else
{
Barrera.Visibility = Visibility.Hidden;
}
}