コード例 #1
0
 /// <summary>
 /// If the control contains a ScrollViewer, this will reset the viewer
 /// to be scrolled to the top.
 /// </summary>
 private void ResetScrollViewer()
 {
     if (SelectorControl != null)
     {
         ScrollViewer sv = SelectorControl.GetLogicalChildrenBreadthFirst().OfType <ScrollViewer>().FirstOrDefault();
         if (sv != null)
         {
             sv.ScrollToTop();
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// If the control contains a ScrollViewer, this will reset the viewer
        /// to be scrolled to the top.
        /// </summary>
        private void ResetScrollViewer()
        {
            ScrollViewer sv = SelectorControl?.GetLogicalChildrenBreadthFirst().OfType <ScrollViewer>().FirstOrDefault();

            sv?.ScrollToTop();
        }