2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using ElmSharp.Wearable;
20 namespace ElmSharp.Test.TC
22 public class CircleScrollerTest3 : TestCaseBase
24 public override string TestName => "CircleScrollerTest3";
25 public override string TestDescription => "To test basic operation of CircleScroller";
27 public override void Run(Window window)
29 Conformant conformant = new Conformant(window);
32 Naviframe naviframe = new Naviframe(conformant);
34 CircleScroller circleScroller = new CircleScroller(naviframe)
40 VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible,
41 HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto,
42 HorizontalScrollBarColor = new Color(255, 0, 0, 50),
43 HorizontalScrollBackgroundColor = Color.Orange,
44 HorizontalScrollBarLineWidth = 15,
45 HorizontalScrollBackgroundLineWidth = 15,
47 circleScroller.Show();
48 naviframe.Push(circleScroller);
50 conformant.SetContent(naviframe);
52 Box box = new Box(window)
61 circleScroller.SetContent(box);
63 var rnd = new Random();
64 for (int i = 0; i < 10; i++)
66 int r = rnd.Next(255);
67 int g = rnd.Next(255);
68 int b = rnd.Next(255);
69 Color color = Color.FromRgb(r, g, b);
70 Rectangle colorBox = new Rectangle(window)
77 MinimumWidth = window.ScreenSize.Width,
80 box.PackEnd(colorBox);
82 circleScroller.Scrolled += (s, e) => Log.Debug(TestName, "Horizental Circle Scroll Scrolled");