Merge "[Telephony] Sample App implementation."
[platform/core/csapi/tizenfx.git] / test / ElmSharp.Test / TC / LabelTest3.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using ElmSharp;
19 using System.Collections.Generic;
20
21 namespace ElmSharp.Test
22 {
23     public class LabelTest3 : TestCaseBase
24     {
25         public override string TestName => "LabelTest3";
26         public override string TestDescription => "To test basic operation of Label";
27
28         public override void Run(Window window)
29         {
30             Background bg = new Background(window)
31             {
32                 AlignmentX = -1,
33                 AlignmentY = -1,
34                 WeightX = 1,
35                 WeightY = 1,
36                 Color = Color.White
37             };
38             bg.Show();
39             window.AddResizeObject(bg);
40
41             Conformant conformant = new Conformant(window);
42             conformant.Show();
43             Scroller scroller = new Scroller(window);
44             scroller.Show();
45             conformant.SetContent(scroller);
46             Box box = new Box(window);
47             box.SetLayoutCallback(() => { });
48             box.Show();
49             scroller.SetContent(box);
50
51             Size size;
52
53             Label label1 = new Label(window);
54             box.PackEnd(label1);
55             Label label2 = new Label(window);
56             box.PackEnd(label2);
57
58
59             label1.Text = "Jo Ann Buckner";
60             label1.TextStyle = "DEFAULT='color=#000000FF font_size=24 align=left valign=bottom wrap=word'";
61             label1.Show();
62             label1.Resize(100000, 0);
63             size = label1.EdjeObject["elm.text"].TextBlockFormattedSize;
64             label1.Geometry = new Rect(55, 213, size.Width, size.Height);
65
66             label2.Text = "Customer Success Engineer";
67             label2.TextStyle = "DEFAULT='color=#000000FF font_size=16 align=left valign=bottom wrap=word'";
68             label2.Show();
69
70             label2.Resize(100000, 0);
71             size = label2.EdjeObject["elm.text"].TextBlockFormattedSize;
72             label2.Geometry = new Rect(55, 300, size.Width, size.Height);
73
74
75         }
76     }
77 }