Missing enum member for WheelBehavior?

Looking at the DiagramTool.WheelBehavior property, I see how I can change the default behavior of the mouse wheel to zoom instead of scroll. However, I don’t see how I can add scrolling functionality back to the mouse wheel. Looking at the definition of the enum, I would expect to see a ControlScrollsVertically member. This way I could set WheelBehavior = Zooms | ControlScrollsVertically | ShiftScrollsHorizontally (or ideally, InverseStandard which is a combination of these three flags just like WheelBehavior.Standard).

Is there another to implement this behavior without overriding DiagramTool.StandardMouseWheel()?

I don’t think anyone has ever asked for that particular combination.

To make it easier for you to override the method, here’s our definition:

protected virtual void StandardMouseWheel() { Diagram diagram = this.Diagram; if (diagram == null) return; DiagramPanel panel = diagram.Panel; if (panel == null) return; int delta = GetWheelDelta(); if (delta == 0) return; MouseWheelEventArgs e = diagram.LastMouseEventArgs as MouseWheelEventArgs; WheelBehavior behave = this.WheelBehavior; bool shift = IsShiftKeyDown(); bool control = IsControlKeyDown(); if (((behave & WheelBehavior.ControlZooms) == WheelBehavior.ControlZooms && !shift && control && diagram.AllowZoom) || ((behave & WheelBehavior.Zooms) == WheelBehavior.Zooms && !shift && !control && diagram.AllowZoom)) { // zoom in or out at current mouse point Point oldzoom = panel.ZoomPoint; panel.ZoomPoint = panel.TransformModelToView(diagram.LastMousePointInModel); CommandHandler cmd = diagram.CommandHandler; if (cmd != null) { if (delta > 0) cmd.IncreaseZoom(null); else cmd.DecreaseZoom(null); } else { if (delta > 0) panel.Scale *= 1.05; else panel.Scale /= 1.05; } panel.ZoomPoint = oldzoom; if (e != null) e.Handled = true; } else if ((behave & WheelBehavior.ScrollsVertically) == WheelBehavior.ScrollsVertically && !shift && !control && diagram.AllowScroll) { // scroll up or down if (delta > 0) panel.MouseWheelUp(); else panel.MouseWheelDown(); if (e != null) e.Handled = true; } else if ((behave & WheelBehavior.ShiftScrollsHorizontally) == WheelBehavior.ShiftScrollsHorizontally && shift && !control && diagram.AllowScroll) { // scroll left or right if (delta > 0) panel.MouseWheelLeft(); else panel.MouseWheelRight(); if (e != null) e.Handled = true; } }
Pardon me if there’s some use of internal methods or other members. If there is, I trust you can figure it out.

Thanks, I appreciate it.