public void HideWindow() { if (!isClosing) { isClosing = true; double completedPanelHeight = CompletedStackPanel.ActualHeight; var storyboard = AnimationUtils.GetStoryboard(); //AnimationUtils.SetTranslateAnimation(storyboard, _mainScrollViewer as FrameworkElement, -_height, 0, 0.6); AnimationUtils.SetTranslateAnimation(storyboard, CompletedStackPanel as FrameworkElement, -_height, 0, 0.3); AnimationUtils.SetOpacityAnimation(storyboard, BackgroundRect as FrameworkElement, 0, 0.3); storyboard.Completed += delegate(object sender1, EventArgs e1) { PopupWindow.HideWindow(); }; storyboard.Begin(); } }
private void ContentTextBox_LostFocus(object sender, RoutedEventArgs e) { PopupWindow.HideWindow(); }
public static void HideWindow() { PopupWindow.HideWindow(false); }