Exemple #1
0
        protected override Point ScrollToControl(Control activeControl)
        {
            Point result = base.ScrollToControl(activeControl);

            if (this.ScrollBarSynchronizationNeeded != null)
            {
                ScrollbarSynchronizationNeededEventArgs args = new ScrollbarSynchronizationNeededEventArgs();
                args.ActiveControl    = activeControl;
                args.ScrolledLocation = result;
                this.ScrollBarSynchronizationNeeded(this, args);
            }
            return(result);
        }
 private void OnContainer_ScrolledToControl(object sender, ScrollbarSynchronizationNeededEventArgs args)
 {
     this.SynchronizeScrollbars(args.ScrolledLocation);
 }