+ _scrollView.SetAxisAutoLock(true);
+
+ // Set scroll view to have 3 pages in X axis and allow page snapping,
+ // and also disable scrolling in Y axis.
+ Property.Map rulerMap = new Property.Map();
+ rulerMap.Add((int)Dali.Constants.ScrollModeType.XAxisScrollEnabled, new Property.Value(true));
+ rulerMap.Add((int)Dali.Constants.ScrollModeType.XAxisSnapToInterval, new Property.Value(windowSize.Width));
+ rulerMap.Add((int)Dali.Constants.ScrollModeType.XAxisScrollBoundary, new Property.Value(windowSize.Width * pageColumns ) );
+ rulerMap.Add((int)Dali.Constants.ScrollModeType.YAxisScrollEnabled, new Property.Value( false ) );
+ _scrollView.ScrollMode = rulerMap;
+
+ // Create a horizontal scroll bar in the bottom of scroll view (which is optional)
+ _scrollBar = new ScrollBar();
+ _scrollBar.ParentOrigin = NDalic.ParentOriginBottomLeft;
+ _scrollBar.PivotPoint = NDalic.AnchorPointTopLeft;
+ _scrollBar.SetResizePolicy(ResizePolicyType.FIT_TO_CHILDREN, DimensionType.Width);
+ _scrollBar.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.Height);
+ _scrollBar.Orientation = new Rotation(new Radian(new Degree(270.0f)), Vector3.ZAXIS);
+ _scrollBar.SetScrollDirection(ScrollBar.Direction.Horizontal);
+ _scrollView.Add(_scrollBar);
+
+ // Connect to the OnRelayout signal
+ _scrollView.Relayout += OnScrollViewRelayout;
+ _scrollView.Touched += OnTouch;
+ _scrollView.WheelRolled += Onwheel;
+ _scrollView.FocusGained += OnKey;
+ _text = new TextLabel("View Touch Event Handler Test");
+ _text.PivotPoint = NDalic.AnchorPointTopLeft;
+ _text.HorizontalAlignment = "CENTER";
+ _text.PointSize = 48.0f;
+
+ _scrollView.Add(_text);