2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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.
19 using System.Runtime.InteropServices;
21 using Tizen.NUI.UIComponents;
22 using Tizen.NUI.BaseComponents;
23 using Tizen.NUI.Constants;
24 //using Tizen.Applications;
26 //------------------------------------------------------------------------------
27 // <manual-generated />
29 // This file can only run on Tizen target. You should compile it with DaliApplication.cs, and
30 // add tizen c# application related library as reference.
31 //------------------------------------------------------------------------------
32 namespace PositionUsesPivotPointTest
34 class Example : NUIApplication
36 private TextLabel _text1;
37 private TextLabel _text2;
38 private Window _window;
40 public Example():base()
44 public Example(string stylesheet):base(stylesheet)
48 public Example(string stylesheet, WindowMode windowMode):base(stylesheet, windowMode)
52 protected override void OnCreate()
58 private void Initialize()
60 // Connect the signal callback for window touched signal
61 _window = Window.Instance;
62 _text1 = new TextLabel("PositionUsesPivotPoint");
63 _text1.ParentOrigin = ParentOrigin.Center;
64 _text1.PivotPoint = PivotPoint.Center;
65 _text1.Position = new Position(0, 0, 0);
66 _text1.PositionUsesPivotPoint = true;
67 _text1.HorizontalAlignment = HorizontalAlignment.Center;
68 _text1.Size2D = new Size2D(200, 100);
69 _text1.PointSize = 10.0f;
70 _text1.BackgroundColor = Color.Blue;
73 _text2 = new TextLabel("PositionNotUsesPivotPoint");
74 _text2.ParentOrigin = ParentOrigin.Center;
75 _text2.PivotPoint = PivotPoint.Center;
76 _text2.Position = new Position(0, 0, 0);
77 _text2.PositionUsesPivotPoint = false;
78 _text2.HorizontalAlignment = HorizontalAlignment.Center;
79 _text2.Size2D = new Size2D(200, 100);
80 _text2.PointSize = 10.0f;
81 _text2.BackgroundColor = Color.Red;
88 /// The main entry point for the application.
91 static void _Main(string[] args)
93 Tizen.Log.Debug("NUI", "Hello mono world.");
94 Example example = new Example("stylesheet", WindowMode.Transparent);