예제 #1
0
        public bool ExternalScrollEmulation(int eDelta)
        {
            {
                var hit = VisualTreeHelper.HitTest(HierarchicalNotesList, Mouse.GetPosition(HierarchicalNotesList));
                if (hit != null)
                {
                    var sv = WPFHelper.GetScrollViewer(HierarchicalNotesList);
                    if (sv == null)
                    {
                        return(false);
                    }

                    sv.ScrollToVerticalOffset(sv.VerticalOffset - eDelta / 3f);
                    return(true);
                }
            }

            {
                var hit = VisualTreeHelper.HitTest(FolderTreeView, Mouse.GetPosition(FolderTreeView));
                if (hit != null)
                {
                    var sv = WPFHelper.GetScrollViewer(FolderTreeView);
                    if (sv == null)
                    {
                        return(false);
                    }

                    sv.ScrollToVerticalOffset(sv.VerticalOffset - eDelta / 3f);
                    return(true);
                }
            }

            return(false);
        }