private void OnHideMessages(object sender, RoutedEventArgs e) { Messages.Visibility = Visibility.Collapsed; }