4 namespace ElmSharp.Test
6 public class PanelTest2 : TestCaseBase
8 public override string TestName => "PanelTest2";
9 public override string TestDescription => "To test basic operation of Panel";
11 public override void Run(Window window)
13 Conformant conformant = new Conformant(window);
15 Box box = new Box(window);
16 conformant.SetContent(box);
19 Label label = new Label(window)
21 Text = "<span color=#ffffff font_size=50>Panel as Scrollable</span>",
28 Panel panel = new Panel(window)
30 Direction = PanelDirection.Left,
36 panel.SetScrollable(true);
37 panel.SetScrollableArea(1.0);
39 Rectangle redbox = new Rectangle(window)
48 panel.SetContent(redbox);
53 Button button1 = new Button(window)
60 Button button2 = new Button(window)
62 Text = "Toggle direction",
72 button1.Clicked += (s, e) =>
76 button2.Clicked += (s, e) =>
78 panel.Direction = (PanelDirection)((int)(panel.Direction + 1) % 4);