I need to verify whether an object is visible or not, I tried to write this code, but It doesn't work (NullReferenceException):
if (PasswordConfirm.Visibility != Visibility.Collapsed)
{
labelInsertPassword.Visibility = Visibility.Collapsed;
PasswordConfirm.Visibility = Visibility.Collapsed;
}
How can I do that? Thank you!