Exemple #1
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            //Connected Animation

            PopOutStoryboard.Begin();
            PopOutStoryboard.Completed += (sender1_, e1_) =>
            {
                PopInStoryboard.Begin();
            };

            if (NavigationRootPage.Current.PageHeader != null)
            {
                var connectedAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("controlAnimation");

                if (connectedAnimation != null)
                {
                    var target = NavigationRootPage.Current.PageHeader.TitlePanel;
                    connectedAnimation.TryStart(target, new UIElement[] { subTitleText });
                }
            }

            var item = await ControlInfoDataSource.Instance.GetItemAsync((String)e.Parameter);

            if (item != null)
            {
                Item = item;

                // Load control page into frame.
                var loader = ResourceLoader.GetForCurrentView();

                string pageRoot = loader.GetString("PageStringRoot");

                string pageString = pageRoot + item.UniqueId + "Page";
                Type   pageType   = Type.GetType(pageString);

                if (pageType != null)
                {
                    this.contentFrame.Navigate(pageType);
                }

                NavigationRootPage.Current.NavigationView.Header = item?.Title;
                if (item.IsNew && NavigationRootPage.Current.CheckNewControlSelected())
                {
                    return;
                }

                ControlInfoDataGroup group = await ControlInfoDataSource.Instance.GetGroupFromItemAsync((String)e.Parameter);

                var menuItem = NavigationRootPage.Current.NavigationView.MenuItems.Cast <NavigationViewItem>().FirstOrDefault(m => m.Tag?.ToString() == group.UniqueId);
                if (menuItem != null)
                {
                    menuItem.IsSelected = true;
                }
            }

            base.OnNavigatedTo(e);
        }
Exemple #2
0
 private void OpenStoryboard_Click(object sender, RoutedEventArgs e)
 {
     PopInStoryboard.Begin();
 }
Exemple #3
0
 private void PopInClick(object sender, RoutedEventArgs e)
 {
     PopInStoryboard.Begin();
     PopIn.IsEnabled  = false;
     PopOut.IsEnabled = true;
 }