public ScrollableBase() : base() { mPanGestureDetector = new PanGestureDetector(); mPanGestureDetector.Attach(this); mPanGestureDetector.AddDirection(PanGestureDetector.DirectionVertical); mPanGestureDetector.Detected += OnPanGestureDetected; mTapGestureDetector = new TapGestureDetector(); mTapGestureDetector.Attach(this); mTapGestureDetector.Detected += OnTapGestureDetected; ClippingMode = ClippingModeType.ClipToBoundingBox; mScrollingChild = new View(); mScrollingChild.Name = "DefaultScrollingChild"; //Interrupt touching when panning is started; mInterruptTouchingChild = new View() { Name = "InterruptTouchingChild", Size = new Size(Window.Instance.WindowSize), BackgroundColor = Color.Transparent, }; mInterruptTouchingChild.TouchEvent += (object source, View.TouchEventArgs args) => { return true; }; Layout = new ScrollableBaseCustomLayout(); }
public ScrollableBase() : base() { mPanGestureDetector = new PanGestureDetector(); mPanGestureDetector.Attach(this); mPanGestureDetector.AddDirection(PanGestureDetector.DirectionVertical); mPanGestureDetector.Detected += OnPanGestureDetected; mTapGestureDetector = new TapGestureDetector(); mTapGestureDetector.Attach(this); mTapGestureDetector.Detected += OnTapGestureDetected; ClippingMode = ClippingModeType.ClipToBoundingBox; mScrollingChild = new View(); Layout = new ScrollableBaseCustomLayout(); }