Replies: 1 comment 7 replies
-
protected override void OnLoad(EventArgs e)
{
_layout = new PixelLayout() { };
_layout.Add(_control, 0, _currentHeight);
Content = _layout;
}
protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
_currentHeight += (int)e.Delta.Height;
_layout.Move(_control, new Point(0, _currentHeight));
}
Not sure if this is the best method. but it feels smooth. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Drawable, which has Content = someControl
I am trying to implement a scrollbar
How can I move the whole Content of the Drawable up and down using Mousewheel? without redrawing everything?
Beta Was this translation helpful? Give feedback.
All reactions