title: Prevent ScrollViewer from handling Mouse Wheel Event
body: <p>Is there a way to prevent a ScrollViewer from handling mouse scrolling?</p>
  
  <p>The following code isn't sufficient, because the event shall be handled by a child element of the ScrollViewer instead:</p>
  
  <pre><code>private void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
  {
       e.Handled = true;
  }
  </code></pre>
  
  <p>EDIT - @Anders Keller Carstensen</p>
  
  <p>I used to instantiate a PlotModel object directly, that's why I didn't see the <code>AddHandler()</code> method. I now changed my code, but the plot doesn't show anything:</p>
  
  <pre><code>public OxyPlot.Wpf.PlotView Plot { get; set; }
  
  public MainWindow()
  {
      InitializeComponent();
      DataContext = this;
  
      Plot = new OxyPlot.Wpf.PlotView();
      Plot.Model = new PlotModel();
  
      Plot.AddHandler(System.Windows.UIElement.PreviewMouseWheelEvent, new MouseWheelEventHandler(Plot_PreviewMouseWheel), true);
  
      // Create Line series
      var s1 = new LineSeries();
      s1.Points.Add(new DataPoint(2, 7));
      s1.Points.Add(new DataPoint(7, 9));
      s1.Points.Add(new DataPoint(9, 4));
  
      // add Series and Axis to plot model
      Plot.Model.Series.Add(s1);
      Plot.Model.InvalidatePlot(false);
  }
  
  private void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
  {
      e.Handled = true;
  }
  
  private void Plot_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
  {
      MessageBox.Show("Button_PreviewMouseWheel");
  }
  </code></pre>
  
  <p>This is the corresponding XAML:</p>
  
  <pre><code>&lt;ScrollViewer Margin="0,25,0,0" PreviewMouseWheel="ScrollViewer_PreviewMouseWheel"&gt;
      &lt;oxy:PlotView Model="{Binding Plot}" Height="2000" Margin="0,0,15,0" /&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>I'm certain that <code>Model="{Binding Plot}"</code> is wrong, but I don't what to write instead.</p>