Esempio n. 1
0
        private async void ScrollViewViewChanging(object sender, ScrollViewerViewChangingEventArgs e)
        {
            try
            {
                var sc = sender as ScrollViewer;
                HandleGoUpRefreshButtons(sc);
                if (sc.VerticalOffset >= GridMainScrollViewer.ActualHeight && !tryingEnableSCs)
                {
                    tryingEnableSCs = true;
                    sc.DisableScroll();
                    S1?.EnableScroll();
                    S2?.EnableScroll();
                    //isMainScrollEnabled = false;
                    ("DISABELING SC MAIN").PrintDebug();
                    GridMainScrollViewer.Height = 0;
                    //SCMain.ChangeView(null, GridMainScrollViewer.ActualHeight, null);
                    try
                    {
                        await Task.Delay(40);

                        S1?.ChangeView(null, lastSC1Offset, null);
                        S2?.ChangeView(null, lastSC2Offset, null);
                    }
                    catch { }
                    await Task.Delay(500);

                    tryingEnableSCs = false;
                }
            }
            catch { }
        }