当前位置: 首页>>代码示例>>C#>>正文


C# ITransition.Stop方法代码示例

本文整理汇总了C#中ITransition.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# ITransition.Stop方法的具体用法?C# ITransition.Stop怎么用?C# ITransition.Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITransition的用法示例。


在下文中一共展示了ITransition.Stop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildPageTransition

        private void BuildPageTransition()
        {
            var transition = new SlideTransition
                {
                    Mode = SlideTransitionMode.SlideLeftFadeIn
                };

            _pageTransition = transition.GetTransition(LayoutRoot);

            _pageTransition.Completed += (sender, args) => _pageTransition.Stop();
        }
开发者ID:ufacode,项目名称:imagenary.wp,代码行数:11,代码来源:AboutView.xaml.cs

示例2: BuildTransition

        private void BuildTransition()
        {
            var tr = new SlideTransition
                {
                    Mode = SlideTransitionMode.SlideRightFadeIn
                };

            _transition = tr.GetTransition(LayoutRoot);

            _transition.Completed += (sender, args) => _transition.Stop();

            var trLeft = new SlideTransition
                {
                    Mode = SlideTransitionMode.SlideLeftFadeIn
                };
            _leftTransition = trLeft.GetTransition(LayoutRoot);

            _leftTransition.Completed += (sender, args) => _leftTransition.Stop();
        }
开发者ID:ufacode,项目名称:imagenary.wp,代码行数:19,代码来源:AuthView.xaml.cs

示例3: CompleteTransition

        /// <summary>
        /// Completes a transition operation by stopping it, restoring 
        /// interactivity, and then firing the OnEndTransition event.
        /// </summary>
        /// <param name="navigationTransition">The navigation transition.</param>
        /// <param name="presenter">The content presenter.</param>
        /// <param name="transition">The transition instance.</param>
        private static void CompleteTransition(NavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)
        {
            if (transition != null)
            {
                transition.Stop();
            }

            RestoreContentPresenterInteractivity(presenter);

            if (navigationTransition != null)
            {
                navigationTransition.OnEndTransition();
            }
        }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:21,代码来源:TransitionFrame.cs

示例4: EnsureStoppedTransition

 /// <summary>
 /// This checks to make sure that, if the transition not be in the clock
 /// state of Stopped, that is will be stopped.
 /// </summary>
 /// <param name="transition">The transition instance.</param>
 private static void EnsureStoppedTransition(ITransition transition)
 {
     if (transition != null && transition.GetCurrentState() != ClockState.Stopped)
     {
         transition.Stop();
     }
 }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:12,代码来源:TransitionFrame.cs

示例5: TransitionNewElement

 /// <summary>
 /// Transitions the new <see cref="T:System.Windows.UIElement"/>.
 /// </summary>
 /// <param name="newTransition">The <see cref="T:Microsoft.Phone.Controls.ITransition"/> for the new <see cref="T:System.Windows.UIElement"/>.</param>
 /// <param name="navigationInTransition">The <see cref="T:Microsoft.Phone.Controls.NavigationInTransition"/>  for the new <see cref="T:System.Windows.UIElement"/>.</param>
 private void TransitionNewElement(ITransition newTransition, NavigationInTransition navigationInTransition)
 {
     _oldContentPresenter.Visibility = Visibility.Collapsed;
     _oldContentPresenter.Content = null;
     if (newTransition == null)
     {
         _newContentPresenter.IsHitTestVisible = true;
         _newContentPresenter.Opacity = 1;
         return;
     }
     if (newTransition.GetCurrentState() != ClockState.Stopped)
     {
         newTransition.Stop();
     }
     newTransition.Completed += delegate
     {
         newTransition.Stop();
         _newContentPresenter.CacheMode = null;
         _newContentPresenter.IsHitTestVisible = true;
         if (navigationInTransition != null)
         {
             navigationInTransition.OnEndTransition();
         }
     };
     Dispatcher.BeginInvoke(delegate
     {
         if (navigationInTransition != null)
         {
             navigationInTransition.OnBeginTransition();
         }
         _newContentPresenter.Opacity = 1;
         newTransition.Begin();
     });
 }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:39,代码来源:TransitionFrame.cs

示例6: TransitionNewElement

 /// <summary>
 /// Transitions the new <see cref="T:System.Windows.UIElement"/>.
 /// </summary>
 /// <param name="oldContentPresenter">The old <see cref="T:System.Windows.Controls.ContentPresenter"/>.</param>
 /// <param name="newContentPresenter">The new <see cref="T:System.Windows.Controls.ContentPresenter"/>.</param>
 /// <param name="transition">The <see cref="T:Microsoft.Phone.Controls.ITransition"/>.</param>
 private static void TransitionNewElement(ContentPresenter oldContentPresenter, ContentPresenter newContentPresenter, ITransition transition)
 {
     oldContentPresenter.Visibility = Visibility.Collapsed;
     oldContentPresenter.Content = null;
     if (transition == null)
     {
         newContentPresenter.Opacity = 1;
     }
     else
     {
         if (transition.GetCurrentState() != ClockState.Stopped)
         {
             transition.Stop();
         }
         transition.Completed += delegate
         {
             transition.Stop();
         };
         newContentPresenter.Opacity = 1;
         transition.Begin();
     }
 }
开发者ID:DarkQuantum,项目名称:WoW-Armory-for-Windows-Phone-8,代码行数:28,代码来源:TransitionFrame.cs


注:本文中的ITransition.Stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。