remove eventhandler from wpf scrollviewer
Posted
by rubentjeuh
on Stack Overflow
See other posts from Stack Overflow
or by rubentjeuh
Published on 2010-05-27T10:05:14Z
Indexed on
2010/05/28
11:42 UTC
Read the original article
Hit count: 248
I've got this:
<ScrollViewer x:Name="svBegin" CanContentScroll="True">
<Grid x:Name="gGegevensGrid" KeyDown="gGegevensGrid_KeyDown" ScrollViewer.VerticalScrollBarVisibility="Visible"></Grid>
</ScrollViewer>
As you can see I've got a KeyDown eventhandler on the grid. But when I press the downkey, the scrollviewer scrolls down. Even when I try this, it doesn't work:
svBegin.KeyDown += new KeyEventHandler(svBegin_KeyDown);
svBegin.KeyDown -= new KeyEventHandler(svBegin_KeyDown);
Anybody who knows how to solve this problem?
© Stack Overflow or respective owner