From a13dc44a7d4129321dfdf9170de1c94a3ee3c7a5 Mon Sep 17 00:00:00 2001 From: Ben Wallis Date: Mon, 3 Dec 2018 16:31:19 +0000 Subject: [PATCH] Added comments --- Filtration/Views/ItemFilterBlockView.xaml.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Filtration/Views/ItemFilterBlockView.xaml.cs b/Filtration/Views/ItemFilterBlockView.xaml.cs index e02df92..e830756 100644 --- a/Filtration/Views/ItemFilterBlockView.xaml.cs +++ b/Filtration/Views/ItemFilterBlockView.xaml.cs @@ -35,6 +35,10 @@ namespace Filtration.Views private void UIElement_OnPreviewMouseWheel(object sender, MouseWheelEventArgs e) { + // Prevents the ScrollViewer from handling mouse wheel events, and passes the events + // to the parent control instead. This is necessary because the ItemsControl that displays + // ItemFilterBlocks is in a ScrollViewer but we want to use the mouse wheel for scrolling + // up and down in ItemFilterScriptView rather than within the block. if (sender is ScrollViewer viewer && !e.Handled) { e.Handled = true;