private void ClosePopup(object sender, RoutedEventArgs e) { var parent = Parent; while (!(parent is GalleryView)) { parent = LogicalTreeHelper.GetParent(parent); } galleryView = (GalleryView)parent; galleryView?.ClosePopUp(); }
private void Close(object sender, RoutedEventArgs e) { IsEnabled = true; galleryview.ClosePopUp(); }