Example #1
0
 private void SetScrollViewerProperties(string scrollViewerName, SerialDisposable revoker)
 {
     if (SharedHelpers.IsRS5OrHigher())
     {
         if (GetTemplateChild(scrollViewerName) is ScrollViewer scrollViewer)
         {
             if (SharedHelpers.IsScrollContentPresenterSizesContentToTemplatedParentAvailable())
             {
                 scrollViewer.Loaded += OnScrollViewerLoaded;
                 revoker.Disposable   = Disposable.Create(() => scrollViewer.Loaded -= OnScrollViewerLoaded);
             }
         }
     }
 }
Example #2
0
        void SetScrollViewerProperties(string scrollViewerName, CompositeDisposable disposable)
        {
            if (SharedHelpers.IsRS5OrHigher())
            {
                if (GetTemplateChild(scrollViewerName) is ScrollViewer scrollViewer)
                {
                    if (SharedHelpers.IsScrollContentPresenterSizesContentToTemplatedParentAvailable())
                    {
                        //	revoker = scrollViewer.Loaded(auto_revoke, { this, &OnScrollViewerLoaded });
                    }

                    if (SharedHelpers.IsScrollViewerReduceViewportForCoreInputViewOcclusionsAvailable())
                    {
                        scrollViewer.ReduceViewportForCoreInputViewOcclusions = true;
                    }
                }
            }
        }