[NUI]Add xaml support for nui and nui xaml test sample (#230)
[platform/core/csapi/tizenfx.git] / test / NUITestSample / NUIXAMLTestSample / UTC / TestTextLabel / TestTextLabel.cs
1 using System;
2 using System.IO;
3 using System.Reflection;
4
5 using Tizen.NUI.Binding;
6 using Tizen.NUI.Xaml;
7 using Tizen.NUI;
8 //using System.ComponentModel;
9
10 namespace Tizen.NUI.Examples
11 {
12     
13     // class MyAppViewModel : INotifyPropertyChanged
14     // {
15
16     //     public event PropertyChangedEventHandler PropertyChanged;
17     //     private Command _firstClick;
18     //     private int count = 0;
19         
20     //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
21     //     public string TextColor = "Red";
22     //     public Command ChangeColor {
23     //         get {
24     //             return _firstClick ?? (_firstClick = new Command (() => {
25     //                 Console.WriteLine ("First button clicked");
26     //                 count += 1;
27     //                 TextColor = colors[count % 7];
28     //             }));
29     //         }
30     //     }
31     
32     //     public MyAppViewModel()
33     //     {
34     //     }
35
36     // }
37
38
39     public class TestTextLabel : NUIApplication
40     {
41         protected override void OnCreate() 
42         {
43             base.OnCreate();
44             Window window = Window.Instance;
45             window.BackgroundColor = Color.White;
46
47             TextLabelTestPage myPage = new TextLabelTestPage(window);
48
49             // MyPage myPage = new MyPage(win);
50             Extensions.LoadFromXaml(myPage, typeof(TextLabelTestPage));
51             
52             Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
53
54         }
55
56         public static void _Main(string[] args)
57         {
58             TestTextLabel p = new TestTextLabel();
59             p.Run(args);
60         }
61     }
62 }