Пример #1
0
        public void NavigateTwunches(TwunchItemViewModel item)
        {
            // flyin the title again
            var titleView = ((FrameworkElement)GetView())
                .Descendants().OfType<TwunchItemView>()
                .Where(x => x.DataContext == item)
                .SelectMany(x => x.Descendants().OfType<FrameworkElement>())
                .SingleOrDefault(el => el.Name == "Title");
            FrameworkElement exitAnimationElement = null;

            if (titleView != null) {
                // animate the element, navigating to the new page when the animation finishes
                _flyOutAnimation.ItemFlyOut(titleView, () => NavigateToTwunchWithId(item.Id));
            }
            else {
                NavigateToTwunchWithId(item.Id);
                return;
            }
        }
Пример #2
0
        public void NavigateTwunches(TwunchItemViewModel item)
        {
            // flyin the title again
            var titleView = ((FrameworkElement)GetView())
                            .Descendants().OfType <TwunchItemView>()
                            .Where(x => x.DataContext == item)
                            .SelectMany(x => x.Descendants().OfType <FrameworkElement>())
                            .SingleOrDefault(el => el.Name == "Title");
            FrameworkElement exitAnimationElement = null;

            if (titleView != null)
            {
                // animate the element, navigating to the new page when the animation finishes
                _flyOutAnimation.ItemFlyOut(titleView, () => NavigateToTwunchWithId(item.Id));
            }
            else
            {
                NavigateToTwunchWithId(item.Id);
                return;
            }
        }