partial void InitializePartial() { #if __SKIA__ _strategy = CompositorScrollStrategy.Instance; #elif __MACOS__ _strategy = TransformScrollStrategy.Instance; #endif _strategy.Initialize(this); // Mouse wheel support PointerWheelChanged += ScrollContentPresenter_PointerWheelChanged; // Touch scroll support ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY; // Updated in PrepareTouchScroll! ManipulationStarting += PrepareTouchScroll; ManipulationDelta += UpdateTouchScroll; ManipulationCompleted += CompleteTouchScroll; }
public ScrollContentPresenter() { #if __SKIA__ _strategy = CompositorScrollStrategy.Instance; #elif __MACOS__ _strategy = TransformScrollStrategy.Instance; #endif _strategy.Initialize(this); // Mouse wheel support PointerWheelChanged += ScrollContentPresenter_PointerWheelChanged; // Touch scroll support ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY; // Updated in PrepareTouchScroll! ManipulationStarting += PrepareTouchScroll; ManipulationDelta += UpdateTouchScroll; ManipulationCompleted += CompleteTouchScroll; // On Skia and macOS (as UWP), the Scrolling is managed by the ScrollContentPresenter, not the ScrollViewer. // Note: This as direct consequences in UIElement.GetTransform and VisualTreeHelper.SearchDownForTopMostElementAt RegisterAsScrollPort(this); }