示例#1
0
 /// <summary>
 /// Adds mouse wheel support to a <see cref="ScrollViewer"/>.
 /// As long as the <see cref="ScrollViewer"/> has focus,
 /// the mouse wheel can be used to scroll up and down.
 /// </summary>
 /// <param name="parentScrollViewer">The parent <see cref="ScrollViewer"/> which contains another <see cref="ScrollViewer"/> which should have mouse wheel scrolling support.</param>
 /// <param name="childScrollViewer">A child <see cref="ScrollViewer"/> to add mouse wheel scrolling support to.</param>
 /// <returns>The child <see cref="ScrollViewer"/>.</returns>
 public static ScrollViewer AddMouseWheelSupport(this ScrollViewer parentScrollViewer, ScrollViewer childScrollViewer)
 {
     return(parentScrollViewer.AddMouseWheelSupport(childScrollViewer, DEFAULT_SCROLL_AMOUNT));
 }