private static void OnScrollChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { LinesPresenter presenter = (sender as LinesPresenter); if (presenter.ScrollOwner != null) { presenter.ScrollOwner.InvalidateScrollInfo(); } if (presenter.ScrollChanged != null) { presenter.ScrollChanged(presenter, new EventArgs()); } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); linesPresenter = (LinesPresenter)Template.FindName("PART_Presenter", this); linesPresenter.ScrollChanged += OnScrolled; }