Revert "[NUI] Dialog and AlertDialog code refactoring with adding DialogPage"
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Samples / Tizen.NUI.Samples / Samples / TitleSample.cs
1 using Tizen.NUI;
2 using Tizen.NUI.BaseComponents;
3 using Tizen.NUI.Components;
4 using Tizen.NUI.Wearable;
5
6 namespace Tizen.NUI.Samples
7 {
8     public class TitleSample : IExample
9     {
10         private Title title;
11         private View root;
12
13         public void Activate()
14         {
15             Window window = NUIApplication.GetDefaultWindow();
16
17             TextLabelStyle attr = new TextLabelStyle
18             {
19                 Size = new Size(300, 39),
20                 BackgroundColor = Color.Black,
21                 TextColor = Color.White,
22             };
23
24             /**
25              * The title inherits textlabel.
26              * Refer to textlabel.
27              */
28             title = new Title(attr);
29             title.Text = "The title can has a fadeOut effect.";
30
31
32             /**
33              * The title has a fadeout effect.
34              * The default width is 32. You can change the value through FadeOutWidth.
35              * ex) title.FadeOutWidth = 10;
36              * The default color is BackgroundColor. You can change the color value through FadeOutColor.
37              * ex) title.FadeOutColor = Color.Red;
38              */
39             window.Add(title);
40         }
41
42         public void Deactivate()
43         {
44             if (root != null)
45             {
46                 NUIApplication.GetDefaultWindow().Remove(root);
47                 root.Dispose();
48             }
49         }
50     }
51 }