private async void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e)
        {
            await HidePopupStoryboard.BeginAsync();

            UserControl_Loaded(null, null);
            await ShowPopupStoryboard.BeginAsync();
        }
Esempio n. 2
0
        private async void _popup_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
            var Host = (FrameworkElement)this.Parent;
            var y    = e.Position.Y;

            if (e.Cumulative.Translation.Y > 50)
            {
                (HidePopupStoryboard.Children[0] as DoubleAnimation).To = Host.ActualHeight;
                (HidePopupStoryboard.Children[1] as DoubleAnimation).To = 0;
                await HidePopupStoryboard.BeginAsync();
            }
            else
            {
                await ShowPopupStoryboard.BeginAsync();
            }
        }
        /// <summary>
        /// This event will complete the manipulation of the user. This will completes hide or reverts the slidedown
        /// </summary>
        /// <param name="sender">Not important</param>
        /// <param name="e">Not important</param>
        private async void _popup_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
            if (outofrangeslide)
            {
                return;
            }
            var Host = (FrameworkElement)this.Parent;

            if (e.Cumulative.Translation.Y > 50)
            {
                (HidePopupStoryboard.Children[0] as DoubleAnimation).To = Host.ActualHeight;
                (HidePopupStoryboard.Children[1] as DoubleAnimation).To = 0;
                await HidePopupStoryboard.BeginAsync();

                await PopupPresenterHost.HideSlideupPopupAsync(this);
            }
            else
            {
                await ShowPopupStoryboard.BeginAsync();
            }
        }
 /// <summary>
 /// This method will pops up the popup frame Syncronosly
 /// </summary>
 public async void ShowPopup()
 {
     await ShowPopupStoryboard.BeginAsync();
 }
 /// <summary>
 /// This method will pops up the popup frame Asynchronously
 /// </summary>
 /// <returns></returns>
 public async Task ShowPopupAsync()
 {
     await ShowPopupStoryboard.BeginAsync();
 }