Example #1
0
        public void RestoreScrollState()
        {
            if (base.Nodes.Count < 1)
            {
                return;
            }

            TreeNode bottomNode = FindClosestPath(State.BottomPath);
            TreeNode topNode    = FindClosestPath(State.TopPath);

            if (bottomNode != null)
            {
                bottomNode.EnsureVisible();
            }

            if (topNode != null)
            {
                topNode.EnsureVisible();
            }

            // manually scroll all the way to the left
            Scrolling.scrollToLeft(this);
        }