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 System.Collections.Generic;
21 namespace ElmSharp.Test
23 class MultiButtonEntryTest2 : TestCaseBase
25 public override string TestName => "MultiButtonEntryTest2";
26 public override string TestDescription => "To test basic operation of MultiButtonEntry";
28 bool _setCallback = false;
30 public override void Run(Window window)
32 Background bg = new Background(window);
33 bg.Color = Color.White;
35 bg.Resize(window.ScreenSize.Width, window.ScreenSize.Height);
38 MultiButtonEntry mbe = new MultiButtonEntry(window)
45 mbe.Append("Append1");
46 mbe.Append("Append2");
47 mbe.Append("Append3");
48 mbe.Append("Append4");
49 mbe.Append("Append5");
50 mbe.Append("Append6");
51 mbe.Append("Append7");
52 mbe.Append("Append8");
53 mbe.Append("Append9");
54 mbe.Append("Append10");
55 mbe.Append("Append11");
56 mbe.Append("Append12");
58 Label label1 = new Label(window)
60 Text = "MultiButtonEntry Test",
64 var expandButton = new Button(window)
71 var formatButton = new Button(window)
78 expandButton.Clicked += (sender, e) =>
80 mbe.IsExpanded = !mbe.IsExpanded;
83 formatButton.Clicked += (sender, e) =>
87 mbe.SetFormatCallback(null);
92 mbe.SetFormatCallback((count) => { return "(" + count + ")"; });
97 label1.Resize(600, 100);
101 mbe.Resize(600, 600);
105 expandButton.Resize(200, 100);
106 expandButton.Move(50, 700);
109 formatButton.Resize(200, 100);
110 formatButton.Move(300, 700);