Exemplo n.º 1
0
        private void gvwIconsList_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                _storeditem = (IconViewModel)e.ClickedItem;
                var gridviewcontrol = IconPackList.FindControl <GridView>(MasterDetailsControl, typeof(GridView), "gvwIconsList");
                if (gridviewcontrol != null)
                {
                    //if (gridviewcontrol.ContainerFromItem(e.ClickedItem) is GridViewItem container)
                    //{
                    //    _storeditem = container.Content as IIconViewModel;

                    //    //prepare the animation
                    //    var animation = gridviewcontrol.PrepareConnectedAnimation("ForwardConnectedAnimation", _storeditem, "IconContentTemplate");
                    //}
                    //TODO: SuppressNavigationTransitionInfo() after connected animation is enabled.
                    ViewModelLocator.Current.NavigationService.Navigate(typeof(IconDetailsViewModel).FullName, _storeditem, new SlideNavigationTransitionInfo()
                    {
                        Effect = SlideNavigationTransitionEffect.FromRight
                    });
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        private void gbwIconsList_Loaded(object sender, RoutedEventArgs e)
        {
            var gridviewcontrol = IconPackList.FindControl <GridView>(MasterDetailsControl, typeof(GridView), "gvwIconsList");
            ///TODO: Connected Animations is not supported in Uwp. Will enable connected animations after Uno support
            //if (_storeditem != null)
            //{
            //    // If the connected item appears outside the viewport, scroll it into view.
            //    gridviewcontrol.ScrollIntoView(_storeditem, ScrollIntoViewAlignment.Default);
            //    gridviewcontrol.UpdateLayout();

            //    // Play the second connected animation.
            //    ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("BackConnectedAnimation");
            //    if (animation != null)
            //    {
            //        // Setup the "back" configuration if the API is present.
            //        if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
            //        {
            //            animation.Configuration = new DirectConnectedAnimationConfiguration();
            //        }

            //        await gridviewcontrol.TryStartConnectedAnimationAsync(animation, _storeditem, "TestThumbnail");
            //    }
            //}
        }
Exemplo n.º 3
0
 public async void Onloaded()
 {
     IconPackCollection = await IconPackList.CreateIconPackList(this);
 }