コード例 #1
0
        //Disable page events
        private void DisablePageEvents()
        {
            try
            {
                //Register popup and load events
                EventProgressDisableUI             -= new DelegateProgressDisableUI(ProgressDisableUI);
                EventProgressEnableUI              -= new DelegateProgressEnableUI(ProgressEnableUI);
                EventHideShowHeader                -= new DelegateHideShowHeader(HideShowHeader);
                EventHideProgressionStatus         -= new DelegateHideProgressionStatus(HideProgressionStatus);
                EventUpdateTotalItemsCount         -= new DelegateUpdateTotalItemsCount(UpdateTotalItemsCount);
                EventAdjustItemsScrollingDirection -= new DelegateAdjustItemsScrollingDirection(AdjustItemsScrollingDirection);
                EventChangeListViewStyle           -= new DelegateChangeListViewStyle(ChangeListViewStyle);

                //Register ListView events
                ListView_Items.Tapped      -= EventsListView.ListView_Items_Tapped;
                ListView_Items.RightTapped -= EventsListView.ListView_Items_RightTapped;

                //Register ListView scroll viewer
                ScrollViewer ListViewScrollViewer = AVFunctions.FindVisualChild <ScrollViewer>(ListView_Items);
                ListViewScrollViewer.ViewChanged -= ScrollViewer_ViewChanged;

                //Monitor user touch swipe
                grid_Main.ManipulationStarted   -= Page_ManipulationStarted;
                grid_Main.ManipulationDelta     -= Page_ManipulationDelta;
                grid_Main.ManipulationCompleted -= Page_ManipulationCompleted;

                //Monitor key presses
                grid_Main.PreviewKeyUp -= Page_PreviewKeyUp; //DesktopOnly
            }
            catch { }
        }
コード例 #2
0
        //Register page events
        private void RegisterPageEvents()
        {
            try
            {
                //Register popup and load events
                EventProgressDisableUI             += new DelegateProgressDisableUI(ProgressDisableUI);
                EventProgressEnableUI              += new DelegateProgressEnableUI(ProgressEnableUI);
                EventHideShowHeader                += new DelegateHideShowHeader(HideShowHeader);
                EventHideProgressionStatus         += new DelegateHideProgressionStatus(HideProgressionStatus);
                EventUpdateTotalItemsCount         += new DelegateUpdateTotalItemsCount(UpdateSelectionFeeds);
                EventAdjustItemsScrollingDirection += new DelegateAdjustItemsScrollingDirection(AdjustItemsScrollingDirection);
                EventChangeListViewStyle           += new DelegateChangeListViewStyle(ChangeListViewStyle);
                EventRefreshPageItems              += new DelegateRefreshPageItems(RefreshItems);

                //Register ListView events
                ListView_Items.Tapped      += EventsListView.ListView_Items_Tapped;
                ListView_Items.RightTapped += EventsListView.ListView_Items_RightTapped;

                //Register ListView scroll viewer
                ScrollViewer ListViewScrollViewer = AVFunctions.FindVisualChild <ScrollViewer>(ListView_Items);
                ListViewScrollViewer.ViewChanged             += ScrollViewer_ViewChanged;
                ListViewScrollViewer.VerticalSnapPointsType   = SnapPointsType.None;
                ListViewScrollViewer.HorizontalSnapPointsType = SnapPointsType.None;

                //Register combo box events
                combobox_FeedSelection.SelectionChanged += combobox_FeedSelection_SelectionChanged;

                //Monitor user touch swipe
                if (!(bool)AppVariables.ApplicationSettings["DisableSwipeActions"])
                {
                    grid_SwipeBar.ManipulationMode       = ManipulationModes.TranslateX;
                    grid_SwipeBar.ManipulationStarted   += Page_ManipulationStarted;
                    grid_SwipeBar.ManipulationDelta     += Page_ManipulationDelta;
                    grid_SwipeBar.ManipulationCompleted += Page_ManipulationCompleted;
                }

                //Monitor key presses
                grid_Main.PreviewKeyUp += Page_PreviewKeyUp; //DesktopOnly
            }
            catch { }
        }