private void CreateRootView() { rootView = new SampleLayout(); rootView.HeaderText = "InputField"; rootView.Focusable = true; rootView.TouchEvent += OnRootViewTouchEvent; }
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]); } }
public void Deactivate() { Window window = Window.Instance; if (searchBar != null) { searchBar.SearchButtonClickEvent -= OnSearchButtonClickEvent; searchBar.CancelButtonClickEvent -= OnCancelButtonClickEvent; rootView.Remove(searchBar); searchBar.Dispose(); searchBar = null; } if (button != null) { rootView.Remove(button); button.Dispose(); button = null; } if (rootView != null) { rootView.Dispose(); rootView = null; } }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(false); root.HeaderText = "Pagination"; ///////////////////////////////////////////////Create by Style////////////////////////////////////////////////////////// DAPagination1 = new Tizen.FH.NUI.Controls.Pagination("DefaultPagination"); DAPagination1.Name = "DAAppPagination1"; DAPagination1.Position2D = new Position2D(200, 50); DAPagination1.Size2D = new Size2D(400, 30); DAPagination1.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); DAPagination1.IndicatorCount = PAGE_COUNT; DAPagination1.SelectedIndex = 0; DAPagination1.Focusable = true; root.Add(DAPagination1); DAPagination1.SelectChangeEvent += DAPagination_SelectChangeEvent; DAPagination2 = new Controls.Pagination("DefaultPagination"); DAPagination2.Name = "DAAppPagination2"; DAPagination2.Position2D = new Position2D(200, 150); DAPagination2.Size2D = new Size2D(230, 30); DAPagination2.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); DAPagination2.IndicatorCount = PAGE_COUNT; DAPagination2.SelectedIndex = 1; DAPagination2.Focusable = true; root.Add(DAPagination2); DAPagination2.SelectChangeEvent += DAPagination_SelectChangeEvent; ///////////////////////////////////////////////Create by Properties////////////////////////////////////////////////////////// DAPagination3 = new Tizen.FH.NUI.Controls.Pagination(); DAPagination3.Name = "DAAppPagination3"; DAPagination3.Position2D = new Position2D(200, 250); DAPagination3.Size2D = new Size2D(400, 30); DAPagination3.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); DAPagination3.IndicatorSize = new Size2D(26, 26); DAPagination3.IndicatorBackgroundURL = CommonResource.GetResourcePath() + "9. Controller/pagination_ic_nor.png"; DAPagination3.IndicatorSelectURL = CommonResource.GetResourcePath() + "9. Controller/pagination_ic_sel.png"; DAPagination3.IndicatorSpacing = 8; DAPagination3.ReturnArrowURLs = new Tizen.NUI.CommonUI.StringSelector { All = CommonResource.GetResourcePath() + "9. Controller/pagination_ic_return.png" }; DAPagination3.ReturnArrowSize = new Size2D(26, 26); DAPagination3.NextArrowURLs = new Tizen.NUI.CommonUI.StringSelector { All = CommonResource.GetResourcePath() + "9. Controller/pagination_ic_next.png" }; DAPagination3.NextArrowSize = new Size2D(26, 26); DAPagination3.IndicatorCount = PAGE_COUNT; DAPagination3.SelectedIndex = 0; DAPagination3.Focusable = true; root.Add(DAPagination3); DAPagination3.SelectChangeEvent += DAPagination_SelectChangeEvent; }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Date Picker"; CreateDatePicker(); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Slider"; CreateInforText(); CreateDA(); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(false); root.HeaderText = "FlexibleView"; flexibleView1 = new Tizen.NUI.CommonUI.FlexibleView(); flexibleView1.Name = "FlexibleView1"; flexibleView1.Position2D = new Position2D(300, 20); flexibleView1.Size2D = new Size2D(400, 450); flexibleView1.Padding = new Extents(10, 10, 10, 10); flexibleView1.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.4f); List <ListItemData> dataList = new List <ListItemData>(); for (int i = 0; i < 131; ++i) { dataList.Add(new ListItemData(i)); } adapter = new ListBridge(dataList); flexibleView1.SetAdapter(adapter); LinearLayoutManager layoutManager1 = new LinearLayoutManager(LinearLayoutManager.VERTICAL); //GridLayoutManager layoutManager1 = new GridLayoutManager(3, LinearLayoutManager.VERTICAL); flexibleView1.SetLayoutManager(layoutManager1); root.Add(flexibleView1); scrollBar1 = new ScrollBar("DAScrollbar"); scrollBar1.Direction = ScrollBar.DirectionType.Vertical; scrollBar1.Position2D = new Position2D(394, 2); scrollBar1.Size2D = new Size2D(4, 446); scrollBar1.ThumbSize = new Size2D(4, 30); flexibleView1.AttachScrollBar(scrollBar1); flexibleView2 = new Tizen.NUI.CommonUI.FlexibleView(); flexibleView2.Name = "FlexibleView2"; flexibleView2.Position2D = new Position2D(150, 520); flexibleView2.Size2D = new Size2D(700, 200); flexibleView2.Padding = new Extents(10, 10, 10, 10); flexibleView2.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.4f); flexibleView2.SetAdapter(adapter); GridLayoutManager layoutManager2 = new GridLayoutManager(3, LinearLayoutManager.HORIZONTAL); flexibleView2.SetLayoutManager(layoutManager2); root.Add(flexibleView2); scrollBar2 = new ScrollBar("DAScrollbar"); scrollBar2.Position2D = new Position2D(2, 194); scrollBar2.Size2D = new Size2D(696, 4); scrollBar2.ThumbSize = new Size2D(30, 4); flexibleView2.AttachScrollBar(scrollBar2); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Button"; BasicButtonNormal = new Tizen.NUI.CommonUI.Button("BasicButton"); BasicButtonNormal.Size2D = new Size2D(300, 80); BasicButtonNormal.Position2D = new Position2D(156, 50); BasicButtonNormal.Text = "BasicButton"; root.Add(BasicButtonNormal); BasicButtonDisabled = new Tizen.NUI.CommonUI.Button("BasicButton"); BasicButtonDisabled.Size2D = new Size2D(300, 80); BasicButtonDisabled.Position2D = new Position2D(624, 50); BasicButtonDisabled.Text = "BasicButton"; BasicButtonDisabled.IsEnabled = false; root.Add(BasicButtonDisabled); ServiceButtonNormal = new Tizen.NUI.CommonUI.Button("ServiceButton"); ServiceButtonNormal.Size2D = new Size2D(300, 80); ServiceButtonNormal.Position2D = new Position2D(156, 200); ServiceButtonNormal.Text = "ServiceButton"; root.Add(ServiceButtonNormal); ServiceButtonDisabled = new Tizen.NUI.CommonUI.Button("ServiceButton"); ServiceButtonDisabled.Size2D = new Size2D(300, 80); ServiceButtonDisabled.Position2D = new Position2D(624, 200); ServiceButtonDisabled.Text = "ServiceButton"; ServiceButtonDisabled.IsEnabled = false; root.Add(ServiceButtonDisabled); ToggleButtonNormal = new Tizen.NUI.CommonUI.Button("ToggleButton"); ToggleButtonNormal.Size2D = new Size2D(300, 80); ToggleButtonNormal.Position2D = new Position2D(156, 350); ToggleButtonNormal.Text = "ToggleButton"; root.Add(ToggleButtonNormal); ToggleButtonDisabled = new Tizen.NUI.CommonUI.Button("ToggleButton"); ToggleButtonDisabled.Size2D = new Size2D(300, 80); ToggleButtonDisabled.Position2D = new Position2D(624, 350); ToggleButtonDisabled.Text = "ToggleButton"; root.Add(ToggleButtonDisabled); OvalButtonNormal = new Tizen.NUI.CommonUI.Button("OvalButton"); OvalButtonNormal.Size2D = new Size2D(100, 100); OvalButtonNormal.Position2D = new Position2D(156, 500); root.Add(OvalButtonNormal); OvalButtonDisabled = new Tizen.NUI.CommonUI.Button("OvalButton"); OvalButtonDisabled.Size2D = new Size2D(100, 100); OvalButtonDisabled.Position2D = new Position2D(624, 500); OvalButtonDisabled.IsEnabled = false; root.Add(OvalButtonDisabled); }
public void Deactivate() { if (root != null) { if (text != null) { root.Remove(text); text.Dispose(); text = null; } if (whiteNavigation != null) { root.Remove(whiteNavigation); whiteNavigation.Dispose(); whiteNavigation = null; } if (blackNavigation != null) { root.Remove(blackNavigation); blackNavigation.Dispose(); blackNavigation = null; } if (conditionNavigation != null) { root.Remove(conditionNavigation); conditionNavigation.Dispose(); conditionNavigation = null; } if (blackConditionNavigation != null) { root.Remove(blackConditionNavigation); blackConditionNavigation.Dispose(); blackConditionNavigation = null; } if (whiteEditNavigation != null) { root.Remove(whiteEditNavigation); whiteEditNavigation.Dispose(); whiteEditNavigation = null; } if (blackEditNavigation != null) { root.Remove(blackEditNavigation); blackEditNavigation.Dispose(); blackEditNavigation = null; } root.Dispose(); root = null; } }
private void CreateRootView() { root = new SampleLayout(false); root.HeaderText = "List Item"; rootView = new View(); rootView.WidthResizePolicy = ResizePolicyType.FillToParent; rootView.HeightResizePolicy = ResizePolicyType.FillToParent; rootView.BackgroundColor = Color.White;// new Color(78.0f / 255.0f, 216.0f / 255.0f, 231.0f / 255.0f, 1.0f); rootView.Focusable = true; root.Add(rootView); }
public void Deactivate() { Window window = Window.Instance; window.KeyEvent -= OnWindowsKeyEvent; for (int i = 0; i < COUNT; ++i) { if (inputFieldArr[i] != null) { if (i % 2 == 0) { inputFieldArr[i].CancelButtonClickEvent -= OnCancelBtnClickEvent; } else { inputFieldArr[i].DeleteButtonClickEvent -= OnDeleteBtnClickEvent; inputFieldArr[i].AddButtonClickEvent -= OnAddBtnClickEvent; } inputFieldArr[i].KeyEvent -= OnKeyEvent; rootView.Remove(inputFieldArr[i]); inputFieldArr[i].Dispose(); inputFieldArr[i] = null; } } inputFieldArr = null; if (guideText != null) { rootView.Remove(guideText); guideText.Dispose(); guideText = null; } if (button != null) { rootView.Remove(button); button.Dispose(); button = null; } if (rootView != null) { rootView.TouchEvent -= OnRootViewTouchEvent; rootView.Dispose(); rootView = null; } }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(false); root.HeaderText = "Toast"; CreateBoardAndButtons(); toast1_1 = new FH.NUI.Controls.Toast("BasicShortToast"); toast1_1.Position2D = new Position2D(30, 0); root.Add(toast1_1); toast1_1.TextArray = new string[1] { "Basic Short Toast" }; toast2_1 = new FH.NUI.Controls.Toast("BasicLongToast"); toast2_1.Position2D = new Position2D(30, 200); root.Add(toast2_1); toast2_1.TextArray = new string[1] { "Long Toast, I can have a loading, I have a very long long long text, I have a very long long" }; toast2_1.LoadingEnable = true; //toast2_1.TextPaddingLeft = 204; toast2_3 = new Tizen.FH.NUI.Controls.Toast(); toast2_3.PointSize = 14; toast2_3.BackgroundImageURL = CommonResource.GetResourcePath() + "12. Toast Popup/toast_background.png"; toast2_3.BackgroundImageBorder = new Rectangle(64, 64, 4, 4); toast2_3.Position2D = new Position2D(30, 350); toast2_3.Size2D = new Size2D(1000, 272); toast2_3.TextPaddingLeft = 96; toast2_3.TextPaddingTop = 48; toast2_3.TextArray = new string[3] { "I have a very long long text, I have a very long long text, I have a very long long text", "This is my 2 line, I have a very long long text, I have a very long long text", "This is my 3 line, I have a very long long text, I have a very long long text" }; root.Add(toast2_3); board.UpFocusableView = button1; FocusManager.Instance.SetCurrentFocusView(button1); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; Window window = Window.Instance; root = new SampleLayout(false); root.HeaderText = "Loading"; CreateBoardAndButtons(); string[] imageArray = new string[36]; for (int i = 0; i < 36; i++) { if (i < 10) { imageArray[i] = CommonResource.GetResourcePath() + "9. Controller/Loading Sequence_Native/loading_0" + i + ".png"; } else { imageArray[i] = CommonResource.GetResourcePath() + "9. Controller/Loading Sequence_Native/loading_" + i + ".png"; } } loading1_1 = new Tizen.NUI.CommonUI.Loading("DefaultLoading"); loading1_1.Position2D = new Position2D(100, 350); loading1_1.Size2D = new Size2D(100, 100); root.Add(loading1_1); LoadingAttributes attr = new LoadingAttributes { ImageArray = imageArray, }; loading2_1 = new Tizen.NUI.CommonUI.Loading(attr); loading2_1.Position2D = new Position2D(500, 350); loading2_1.Size2D = new Size2D(100, 100); root.Add(loading2_1); board.UpFocusableView = button1; window.Add(root); FocusManager.Instance.SetCurrentFocusView(button1); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Time Picker"; CreateBaseTimePicker(); 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(160 + i * 260, 1350); button[i].Text = mode[i]; button[i].PointSize = 11; button[i].ClickEvent += ButtonClickEvent; root.Add(button[i]); } }
public void Activate() { Window.Instance.BackgroundColor = Color.White; i = 1; root = new SampleLayout(false); root.HeaderText = "NaviFrame"; navi = new Controls.NaviFrame("DefaultNaviFrame"); root.Add(navi); BackButton = new Tizen.NUI.CommonUI.Button() { Size2D = new Size2D(90, 60), BackgroundColor = Color.Cyan, Text = "Push", PointSize = 14, }; BackButton.PositionUsesPivotPoint = true; BackButton.ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft; BackButton.PivotPoint = Tizen.NUI.PivotPoint.CenterLeft; BackButton.ClickEvent += ClickPush; root.Add(BackButton); BackButton.RaiseToTop(); NextButton = new Tizen.NUI.CommonUI.Button() { Text = "Pop", Size2D = new Size2D(90, 60), BackgroundColor = Color.Cyan, PointSize = 14, }; NextButton.PositionUsesPivotPoint = true; NextButton.ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight; NextButton.PivotPoint = Tizen.NUI.PivotPoint.CenterRight; NextButton.ClickEvent += ClickPop; root.Add(NextButton); NextButton.RaiseToTop(); ClickPush(null, null); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; Window window = Window.Instance; root = new SampleLayout(); root.HeaderText = "Progress"; button1 = new Tizen.NUI.CommonUI.Button("BasicButton"); button1.BackgroundColor = Color.Green; button1.Position2D = new Position2D(300, 200); button1.Size2D = new Size2D(80, 80); button1.Text = "+"; root.Add(button1); button1.Focusable = true; button1.ClickEvent += bar1Add; button2 = new Tizen.NUI.CommonUI.Button("BasicButton"); button2.BackgroundColor = Color.Green; button2.Position2D = new Position2D(700, 200); button2.Size2D = new Size2D(80, 80); button2.Text = "-"; root.Add(button2); button2.Focusable = true; button2.ClickEvent += bar1Minus; progressBar1 = new Tizen.NUI.CommonUI.Progress("Progressbar"); progressBar1.Position2D = new Position2D(300, 100); progressBar1.Size2D = new Size2D(500, 4); progressBar1.MaxValue = 100; progressBar1.MinValue = 0; progressBar1.CurrentValue = 45; root.Add(progressBar1); window.Add(root); FocusManager.Instance.SetCurrentFocusView(button1); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(false); root.HeaderText = "Header"; root1 = new View() { SizeWidth = 1080, Position2D = new Position2D(0, 0), BackgroundColor = new Color(1.0f, 1.0f, 0, 0.7f), SizeHeight = 200, }; Controls.Header header1 = new Tizen.FH.NUI.Controls.Header(); header1.Position2D = new Position2D(0, 0); header1.BackgroundColor = new Color(255, 255, 255, 1); header1.Size2D = new Size2D(1080, 128); header1.HeaderText = "Title Area Default"; header1.HeaderTextColor = new Color(0, 0, 0, 1); //black header1.LinebackgroundColor = new Color(0, 0, 0, 0.2f); //white root1.Add(header1); root.Add(root1); root2 = new View() { SizeWidth = 1080, Position2D = new Position2D(0, 210), BackgroundColor = new Color(1.0f, 1.0f, 0, 0.7f), SizeHeight = 200, }; Controls.Header header2 = new Tizen.FH.NUI.Controls.Header(); header2.Position2D = new Position2D(0, 0); header2.Size2D = new Size2D(1080, 128); header1.BackgroundColor = new Color(255, 255, 255, 0.7f); header2.HeaderText = "Title Area Opqaue"; header2.HeaderTextColor = new Color(0, 0, 0, 1); //black header2.LinebackgroundColor = new Color(0, 0, 0, 0.2f); //black root2.Add(header2); root.Add(root2); root3 = new View() { SizeWidth = 1080, Position2D = new Position2D(0, 420), BackgroundColor = new Color(0, 0, 0, 1), SizeHeight = 200, }; Controls.Header header3 = new Controls.Header(); header3.Position2D = new Position2D(0, 0); header3.Size2D = new Size2D(1080, 128); header3.HeaderText = "Title Area Transparency"; header3.HeaderTextColor = new Color(255, 255, 255, 1); //white header3.LinebackgroundColor = new Color(255, 255, 255, 0.2f); //white root3.Add(header3); root.Add(root3); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Switch"; if (styles.Length == 0 || applications.Length == 0) { return; } colNum = (uint)applications.Length + 1; rowNum = (uint)styles.Length + 1; table = new TableView(rowNum, colNum) { Size2D = new Size2D(1080, 1920), }; for (uint i = 1; i < rowNum; i++) { TextLabel text = new TextLabel(); text.Size2D = new Size2D(Width, 150); text.PointSize = 12; text.Focusable = true; text.HorizontalAlignment = HorizontalAlignment.Center; text.VerticalAlignment = VerticalAlignment.Center; text.Text = styles[i - 1]; table.AddChild(text, new TableView.CellPosition(i, 0)); } for (uint i = 1; i < colNum; i++) { TextLabel text = new TextLabel(); text.Size2D = new Size2D(Width, 150); text.PointSize = 12; text.HorizontalAlignment = HorizontalAlignment.Center; text.VerticalAlignment = VerticalAlignment.Center; text.Text = applications[i - 1]; text.Focusable = true; table.AddChild(text, new TableView.CellPosition(0, i)); } for (uint j = 1; j < colNum; j++) { for (uint i = 1; i < rowNum; i++) { Tizen.NUI.CommonUI.Switch switchControl = new Tizen.NUI.CommonUI.Switch("Switch"); switchControl.Size2D = new Size2D(96, 60); if (i == 3) { switchControl.IsEnabled = false; } else if (i == 4) { switchControl.IsEnabled = false; switchControl.IsSelected = true; } table.AddChild(switchControl, new TableView.CellPosition(i, j)); } } for (uint i = 0; i < rowNum; i++) { table.SetFixedHeight(i, Height); for (uint j = 0; j < colNum; j++) { table.SetFixedWidth(j, Width); table.SetCellAlignment(new TableView.CellPosition(i, j), HorizontalAlignmentType.Center, VerticalAlignmentType.Center); } } root.Add(table); }
private void CreateRootView() { rootView = new SampleLayout(); rootView.HeaderText = "SearchBar"; }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "DropDown"; text = new TextLabel(); text.Text = "DropDown Clicked item string is "; text.PointSize = 14; text.Size2D = new Size2D(880, 50); text.Position2D = new Position2D(100, 10); text.HorizontalAlignment = HorizontalAlignment.Center; text.MultiLine = true; root.Add(text); dropDown = new Tizen.NUI.CommonUI.DropDown("HeaderDropDown"); dropDown.Size2D = new Size2D(1080, 108); dropDown.Position2D = new Position2D(0, 100); dropDown.ListSize2D = new Size2D(360, 500); dropDown.HeaderText = "Header area"; dropDown.ButtonText = "Normal list 1"; dropDown.ItemClickEvent += DropDownItemClickEvent; root.Add(dropDown); for (int i = 0; i < 8; i++) { Tizen.NUI.CommonUI.DropDown.DropDownItemData item = new Tizen.NUI.CommonUI.DropDown.DropDownItemData("TextListItem"); item.Size2D = new Size2D(360, 96); item.Text = "Normal list " + i; dropDown.AddItem(item); } dropDown.SelectedItemIndex = 1; ////////Attach scrollbar/////////// scrollBar = new ScrollBar(); scrollBar.Direction = ScrollBar.DirectionType.Vertical; scrollBar.Position2D = new Position2D(394, 2); scrollBar.Size2D = new Size2D(4, 446); scrollBar.TrackColor = Color.Green; scrollBar.ThumbSize = new Size2D(4, 30); scrollBar.ThumbColor = Color.Yellow; scrollBar.TrackImageURL = CommonResource.GetResourcePath() + "component/c_progressbar/c_progressbar_white_buffering.png"; dropDown.AttachScrollBar(scrollBar); //////////////////ListSpinner DropDown//////////////////////// dropDown2 = new Tizen.NUI.CommonUI.DropDown("ListDropDown"); dropDown2.Size2D = new Size2D(1080, 108); dropDown2.Position2D = new Position2D(0, 300); dropDown2.ListSize2D = new Size2D(360, 192); dropDown2.HeaderText = "List area"; dropDown2.ButtonText = "Menu"; root.Add(dropDown2); for (int i = 0; i < 2; i++) { Tizen.NUI.CommonUI.DropDown.DropDownItemData item = new Tizen.NUI.CommonUI.DropDown.DropDownItemData("IconListItem"); item.Size2D = new Size2D(360, 96); item.IconResourceUrl = iconImage[i]; dropDown2.AddItem(item); } dropDown2.SelectedItemIndex = 0; dropDown.RaiseToTop(); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "CheckBox"; if (styles.Length == 0 || applications.Length == 0) { return; } colNum = (uint)applications.Length + 1; rowNum = (uint)styles.Length + 1; table = new TableView(rowNum, colNum) { Size2D = new Size2D(1080, 1920), }; for (uint i = 1; i < rowNum; i++) { TextLabel text = new TextLabel(); text.Size2D = new Size2D(Width, Height); text.PointSize = 12; text.Focusable = true; text.HorizontalAlignment = HorizontalAlignment.Center; text.VerticalAlignment = VerticalAlignment.Center; text.Text = styles[i - 1]; table.AddChild(text, new TableView.CellPosition(i, 0)); } for (uint i = 1; i < colNum; i++) { TextLabel text = new TextLabel(); text.Size2D = new Size2D(Width, Height); text.PointSize = 12; text.HorizontalAlignment = HorizontalAlignment.Center; text.VerticalAlignment = VerticalAlignment.Center; text.Text = applications[i - 1]; text.Focusable = true; table.AddChild(text, new TableView.CellPosition(0, i)); } group = new CheckBoxGroup[4]; for (uint j = 1; j < colNum; j++) { group[j - 1] = new CheckBoxGroup(); for (uint i = 1; i < rowNum; i++) { Tizen.NUI.CommonUI.CheckBox checkBox = new Tizen.NUI.CommonUI.CheckBox("CheckBox"); checkBox.Size2D = new Size2D(48, 48); if (i == 3) { checkBox.IsEnabled = false; } else if (i == 4) { checkBox.IsEnabled = false; checkBox.IsSelected = true; } else { group[j - 1].Add(checkBox); } checkBox.Focusable = true; //checkBox.Text = checkBox.IsSelected.ToString(); checkBox.SelectedEvent += CheckBoxSelectedEvent; table.AddChild(checkBox, new TableView.CellPosition(i, j)); } } for (uint i = 0; i < rowNum; i++) { table.SetFixedHeight(i, Height); for (uint j = 0; j < colNum; j++) { table.SetFixedWidth(j, Width); table.SetCellAlignment(new TableView.CellPosition(i, j), HorizontalAlignmentType.Center, VerticalAlignmentType.Center); } } root.Add(table); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Navigation"; text = new TextLabel(); text.PointSize = 14; text.Text = "Create Navigation by style"; text.Size2D = new Size2D(480, 100); text.Position2D = new Position2D(300, 10); text.MultiLine = true; root.Add(text); ////////white navigation////////// #region WhiteNaviagtion whiteNavigation = new Controls.Navigation("Back"); whiteNavigation.Position2D = new Position2D(100, 150); root.Add(whiteNavigation); Controls.Navigation.NavigationItemData backItem = new Controls.Navigation.NavigationItemData("WhiteBackItem"); whiteNavigation.AddItem(backItem); #endregion ////////black navigation////////// #region BlackNavigation blackNavigation = new Controls.Navigation("Back"); blackNavigation.Position2D = new Position2D(300, 150); root.Add(blackNavigation); Controls.Navigation.NavigationItemData blackBackItem = new Controls.Navigation.NavigationItemData("BlackBackItem"); blackNavigation.AddItem(blackBackItem); #endregion //////condition navigation////////// #region WhiteConditionNavigation conditionNavigation = new Controls.Navigation("WhiteCondition"); conditionNavigation.Position2D = new Position2D(100, 400); conditionNavigation.ItemChangedEvent += NavigationItemChangedEvent; root.Add(conditionNavigation); for (int i = 0; i < 3; i++) { Controls.Navigation.NavigationItemData conditionItem = new Controls.Navigation.NavigationItemData("WhiteConditionItem"); conditionItem.Size2D = new Size2D(116, 128); conditionItem.Text = "Text " + i; conditionItem.SubText = "SubText " + i; conditionItem.IconURLSelector = new StringSelector { Pressed = itemPressImage[i], Disabled = itemDimImage[i], DisabledFocused = itemDimImage[i], DisabledSelected = itemDimImage[i], Other = itemNormalImage[i] }; conditionNavigation.AddItem(conditionItem); } #endregion //////black condition navigation////////// #region BlackConditionNavigation blackConditionNavigation = new Controls.Navigation("BlackCondition"); blackConditionNavigation.Position2D = new Position2D(300, 400); blackConditionNavigation.ItemChangedEvent += NavigationItemChangedEvent; root.Add(blackConditionNavigation); for (int i = 0; i < 3; i++) { Controls.Navigation.NavigationItemData conditionItem = new Controls.Navigation.NavigationItemData("BlackConditionItem"); conditionItem.Size2D = new Size2D(116, 128); conditionItem.Text = "Text " + i; conditionItem.SubText = "SubText " + i; conditionItem.IconURLSelector = new StringSelector { Pressed = itemBlackPressImage[i], Disabled = itemBlackDimImage[i], DisabledFocused = itemBlackDimImage[i], DisabledSelected = itemBlackDimImage[i], Other = itemBlackNormalImage[i] }; blackConditionNavigation.AddItem(conditionItem); } #endregion //////////White Edit Mode/////////////// #region WhiteEditModeNavigation whiteEditNavigation = new Controls.Navigation("WhiteEditMode"); whiteEditNavigation.Size2D = new Size2D(178, 800); whiteEditNavigation.Position2D = new Position2D(500, 150); whiteEditNavigation.ItemChangedEvent += NavigationItemChangedEvent; root.Add(whiteEditNavigation); Controls.Navigation.NavigationItemData firstEditItem = new Controls.Navigation.NavigationItemData("WhiteEditModeFirstItem"); firstEditItem.Size2D = new Size2D(178, 184); firstEditItem.Text = "1"; firstEditItem.SubText = "SELECTED"; whiteEditNavigation.AddItem(firstEditItem); for (int i = 0; i < 2; i++) { Controls.Navigation.NavigationItemData editItem = new Controls.Navigation.NavigationItemData("WhiteEditModeItem"); editItem.Size2D = new Size2D(178, 108); editItem.Text = "Text " + i; editItem.IconURLSelector = new StringSelector { Pressed = itemPressImage[i], Disabled = itemDimImage[i], DisabledFocused = itemDimImage[i], DisabledSelected = itemDimImage[i], Other = itemNormalImage[i] }; whiteEditNavigation.AddItem(editItem); } Controls.Navigation.NavigationItemData editLastItem = new Controls.Navigation.NavigationItemData("WhiteEditModeLastItem"); editLastItem.Size2D = new Size2D(178, 166); editLastItem.Text = "Cancel"; editLastItem.IconURLSelector = new StringSelector { Pressed = CommonResource.GetResourcePath() + "2. Side Navigation/sidenavi_btn_cancel_press.png", Disabled = CommonResource.GetResourcePath() + "2. Side Navigation/sidenavi_btn_cancel_dim.png", DisabledFocused = CommonResource.GetResourcePath() + "2. Side Navigation/sidenavi_btn_cancel_dim.png", DisabledSelected = CommonResource.GetResourcePath() + "2. Side Navigation/sidenavi_btn_cancel_dim.png", Other = CommonResource.GetResourcePath() + "2. Side Navigation/sidenavi_btn_cancel.png" }; whiteEditNavigation.AddItem(editLastItem); #endregion //////////Black Edit Mode/////////////// #region BlackEditModeNavigation blackEditNavigation = new Controls.Navigation("BlackEditMode"); blackEditNavigation.Size2D = new Size2D(178, 800); blackEditNavigation.Position2D = new Position2D(700, 150); blackEditNavigation.ItemChangedEvent += NavigationItemChangedEvent; root.Add(blackEditNavigation); Controls.Navigation.NavigationItemData firstEditItem2 = new Tizen.FH.NUI.Controls.Navigation.NavigationItemData("BlackEditModeFirstItem"); firstEditItem2.Size2D = new Size2D(178, 184); firstEditItem2.Text = "1"; firstEditItem2.SubText = "SELECTED"; blackEditNavigation.AddItem(firstEditItem2); for (int i = 0; i < 2; i++) { Controls.Navigation.NavigationItemData editItem = new Tizen.FH.NUI.Controls.Navigation.NavigationItemData("BlackEditModeItem"); editItem.Size2D = new Size2D(178, 108); editItem.Text = "Text " + i; editItem.IconURLSelector = new StringSelector { Pressed = itemBlackPressImage[i], Disabled = itemBlackDimImage[i], DisabledFocused = itemBlackDimImage[i], DisabledSelected = itemBlackDimImage[i], Other = itemBlackNormalImage[i] }; blackEditNavigation.AddItem(editItem); } Controls.Navigation.NavigationItemData editLastItem2 = new Tizen.FH.NUI.Controls.Navigation.NavigationItemData("BlackEditModeLastItem"); editLastItem2.Size2D = new Size2D(178, 166); editLastItem2.Text = "Cancel"; editLastItem2.IconURLSelector = new StringSelector { Pressed = CommonResource.GetResourcePath() + "2. Side Navigation/[Black ver.]/sidenavi_btn_cancel_b_press.png", Disabled = CommonResource.GetResourcePath() + "2. Side Navigation/[Black ver.]/sidenavi_btn_cancel_b_dim.png", DisabledFocused = CommonResource.GetResourcePath() + "2. Side Navigation/[Black ver.]/sidenavi_btn_cancel_b_dim.png", DisabledSelected = CommonResource.GetResourcePath() + "2. Side Navigation/[Black ver.]/sidenavi_btn_cancel_b_dim.png", Other = CommonResource.GetResourcePath() + "2. Side Navigation/[Black ver.]/sidenavi_btn_cancel_b.png" }; blackEditNavigation.AddItem(editLastItem2); #endregion }
public void Activate() { Window.Instance.BackgroundColor = Color.White; Window window = Window.Instance; root = new SampleLayout(false); root.HeaderText = "Scrollbar"; CreateBoardAndButtons(); daScrollBar1 = new ScrollBar("DAScrollbar"); daScrollBar1.Position2D = new Position2D(100, 200); daScrollBar1.Size2D = new Size2D(300, 4); daScrollBar1.MaxValue = (int)daScrollBar1.SizeWidth / 10; daScrollBar1.MinValue = 0; daScrollBar1.ThumbSize = new Size2D(30, 4); daScrollBar1.CurrentValue = 0; daScrollBar1.Direction = ScrollBar.DirectionType.Horizontal; root.Add(daScrollBar1); daScrollBar2 = new ScrollBar("DAScrollbar"); daScrollBar2.Position2D = new Position2D(500, 100); daScrollBar2.Size2D = new Size2D(4, 300); daScrollBar2.MaxValue = (int)daScrollBar1.SizeWidth / 10; daScrollBar2.MinValue = 0; daScrollBar2.ThumbSize = new Size2D(4, 30); daScrollBar2.CurrentValue = 0; daScrollBar2.Direction = ScrollBar.DirectionType.Vertical; root.Add(daScrollBar2); scrollBar1 = new ScrollBar(); scrollBar1.Position2D = new Position2D(100, 300); scrollBar1.Size2D = new Size2D(300, 4); scrollBar1.TrackColor = Color.Green; scrollBar1.MaxValue = (int)scrollBar1.SizeWidth / 10; scrollBar1.MinValue = 0; scrollBar1.ThumbSize = new Size2D(30, 4); scrollBar1.CurrentValue = 0; scrollBar1.ThumbColor = Color.Black; root.Add(scrollBar1); ScrollBarAttributes attr = new ScrollBarAttributes { TrackImageAttributes = new ImageAttributes { BackgroundColor = new ColorSelector { All = new Color(0.43f, 0.43f, 0.43f, 0.1f), } }, ThumbImageAttributes = new ImageAttributes { BackgroundColor = new ColorSelector { All = new Color(0.0f, 0.0f, 0.0f, 0.2f), } }, }; scrollBar2 = new ScrollBar(attr); scrollBar2.Position2D = new Position2D(100, 400); scrollBar2.Size2D = new Size2D(300, 4); scrollBar2.MaxValue = (int)scrollBar2.SizeWidth / 10; scrollBar2.MinValue = 0; scrollBar2.ThumbSize = new Size2D(30, 4); scrollBar2.CurrentValue = 0; root.Add(scrollBar2); window.Add(root); FocusManager.Instance.SetCurrentFocusView(button1); }