wpf c# remove eventhandler from scrollviewer
- by rubentjeuh
I've got this:
<ScrollViewer x:Name="svBegin" CanContentScroll="True">
<Grid x:Name="gGegevensGrid" KeyDown="gGegevensGrid_KeyDown" ScrollViewer.VerticalScrollBarVisibility="Visible"></Grid>
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?
Thanks!