Exemplo n.º 1
0
        public void Activate()
        {
            Window.Instance.BackgroundColor = Color.White;
            root            = new SampleLayout();
            root.HeaderText = "Tab";

            tab = new Tizen.NUI.CommonUI.Tab("Tab");
            tab.IsNatureTextWidth = false;
            tab.Size2D            = new Size2D(1080, 108);
            tab.Position2D        = new Position2D(0, 300);
            tab.BackgroundColor   = new Color(1.0f, 1.0f, 1.0f, 0.5f);
            root.Add(tab);

            for (int i = 0; i < 3; i++)
            {
                Tizen.NUI.CommonUI.Tab.TabItemData item = new Tizen.NUI.CommonUI.Tab.TabItemData();
                item.Text = "Tab " + i;
                if (i == 1)
                {
                    item.Text = "Long long Tab " + i;
                }
                tab.AddItem(item);
            }

            for (int i = 0; i < num; i++)
            {
                button[i]             = new Tizen.NUI.CommonUI.Button("ServiceButton");
                button[i].Size2D      = new Size2D(240, 80);
                button[i].Position2D  = new Position2D(280 + i * 260, 700);
                button[i].Text        = mode[i];
                button[i].ClickEvent += ButtonClickEvent;
                root.Add(button[i]);
            }
        }
Exemplo n.º 2
0
        public void Deactivate()
        {
            if (root != null)
            {
                if (tab != null)
                {
                    root.Remove(tab);
                    tab.Dispose();
                    tab = null;
                }

                for (int i = 0; i < num; i++)
                {
                    if (button[i] != null)
                    {
                        root.Remove(button[i]);
                        button[i].Dispose();
                        button[i] = null;
                    }
                }

                root.Dispose();
            }
        }