示例#1
0
        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());
            }
        }
示例#2
0
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     linesPresenter = (LinesPresenter)Template.FindName("PART_Presenter", this);
     linesPresenter.ScrollChanged += OnScrolled;
 }
示例#3
0
文件: PadEditor.cs 项目: faboo/Agent
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     linesPresenter = (LinesPresenter)Template.FindName("PART_Presenter", this);
     linesPresenter.ScrollChanged += OnScrolled;
 }