3 using Tizen.NUI.BaseComponents;
5 namespace NUISimpleCallee
7 class Program : NUIApplication
9 protected override void OnCreate()
17 Window.Instance.KeyEvent += OnKeyEvent;
18 Window.Instance.TouchEvent += OnTouchEvent;
20 TextLabel text = new TextLabel("Callee");
21 text.HorizontalAlignment = HorizontalAlignment.Center;
22 text.VerticalAlignment = VerticalAlignment.Center;
23 text.TextColor = Color.Red;
24 text.PointSize = 12.0f;
25 text.HeightResizePolicy = ResizePolicyType.FillToParent;
26 text.WidthResizePolicy = ResizePolicyType.FillToParent;
27 Window.Instance.GetDefaultLayer().Add(text);
29 TransitionOptions = new TransitionOptions(GetDefaultWindow());
30 TransitionOptions.EnableTransition = true;
33 private void OnTouchEvent(object sender, Window.TouchEventArgs e)
35 if (e.Touch.GetState(0) == PointStateType.Up)
41 public void OnKeyEvent(object sender, Window.KeyEventArgs e)
43 if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
49 static void Main(string[] args)
51 var app = new Program();