public IndicatorViewTest4Page() { InitializeComponent(); List <Pagination> indexers = new List <Pagination>(); PaginationStyle paginationStyle = new PaginationStyle() { IndicatorSize = new Size(26, 26), IndicatorSpacing = 8, }; indexers.Add(Index0); indexers.Add(Index1); indexers.Add(Index2); indexers.Add(Index3); indexers.Add(Index4); indexers.Add(Index5); for (int i = 0; i < 6; ++i) { indexers[i].ApplyStyle(paginationStyle); indexers[i].PositionUsesPivotPoint = true; indexers[i].BackgroundColor = Tizen.NUI.Color.Gray; } indexers[0].IndicatorCount = 3; indexers[1].IndicatorCount = 4; indexers[2].IndicatorCount = 5; indexers[3].IndicatorCount = 3; indexers[4].IndicatorCount = 4; indexers[5].IndicatorCount = 5; }
public IndicatorViewTest1Page() { InitializeComponent(); Scroller.ScrollAnimationEnded += OnScrollAnimationEnded; PaginationStyle paginationStyle = new PaginationStyle() { IndicatorSize = new Size(26, 26), IndicatorSpacing = 8, }; Index.ApplyStyle(paginationStyle); Index.PositionUsesPivotPoint = true; Index.ParentOrigin = new Position(0.5f, 0.05f, 0.5f); Index.IndicatorCount = PagesCount; Index.SelectedIndex = 0; IndicatorPositions = new List <Position>(); for (int i = 0; i < PagesCount; ++i) { IndicatorPositions.Add(Index.GetIndicatorPosition(i)); } Index.BackgroundColor = Tizen.NUI.Color.Gray; Index.TouchEvent += OnIndexTouchEvent; }
protected override ViewStyle GetViewStyle() { PaginationStyle Style = new PaginationStyle { /// size of the pagination indicator IndicatorSize = new Size(100, 100), /// size of the space between the indicators IndicatorSpacing = 50, /// images used for two states of the indicators IndicatorImageUrl = new Selector <string> { Normal = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/gray.png", Selected = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/blue.png" }, Name = "Pagination", /// size of the pagination box Size = new Size(500, 200), BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 1.0f), /// the reference point of the parent set on the top center ParentOrigin = ParentOrigin.TopCenter, /// the reference point of the pagination set to top center /// since no shift is defined, the two reference points will overlap PivotPoint = PivotPoint.TopCenter, /// if 'true' the set PivotPoint is used, otherwise the default value is used PositionUsesPivotPoint = true }; return(Style); }
public CarouselViewTest1Page() { InitializeComponent(); DefaultScrollbarState = Scroller.HideScrollbar; Never.Clicked += OnNeverButtonClicked; Always.Clicked += OnAlwaysButtonClicked; Default.Clicked += OnDefaultButtonClicked; Scroller.ScrollAnimationEnded += OnScrollAnimationEnded; Scroller.ScrollDragStarted += OnScrollDragStarted; PaginationStyle paginationStyle = new PaginationStyle() { IndicatorSize = new Size(26, 26), IndicatorSpacing = 8, IndicatorImageUrl = new Selector <string> { Normal = ResourcePath + "pagination_ic_nor.png", Selected = ResourcePath + "pagination_ic_sel.png" } }; Index.ApplyStyle(paginationStyle); Index.BackgroundColor = Color.Gray; Index.IndicatorCount = 3; Index.SelectedIndex = 0; }
public void Activate() { Window window = Window.Instance; ///////////////////////////////////////////////Create by Properties////////////////////////////////////////////////////////// pagination1 = new Pagination(); pagination1.Name = "Pagination1"; pagination1.Position2D = new Position2D(500, 450); pagination1.Size2D = new Size2D(400, 30); pagination1.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); pagination1.IndicatorSize = new Size(26, 26); pagination1.IndicatorImageURL = new Selector <string>() { Normal = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_nor.png", Selected = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_sel.png", }; pagination1.IndicatorSpacing = 8; pagination1.IndicatorCount = PAGE_COUNT; pagination1.SelectedIndex = 0; window.Add(pagination1); ///////////////////////////////////////////////Create by Attributes////////////////////////////////////////////////////////// PaginationStyle style = new PaginationStyle(); style.IndicatorSize = new Size(15, 15); style.IndicatorImageURL = new Selector <string>() { Normal = CommonResource.GetTVResourcePath() + "component/c_pagination/c_paganation_medium_dot_normal.png", Selected = CommonResource.GetTVResourcePath() + "component/c_pagination/c_paganation_medium_dot_focus.png", }; style.IndicatorSpacing = 14; pagination2 = new Pagination(style); pagination2.Name = "Pagination2"; pagination2.Position2D = new Position2D(500, 500); pagination2.Size2D = new Size2D(400, 30); pagination2.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); pagination2.IndicatorCount = PAGE_COUNT; pagination2.SelectedIndex = 0; window.Add(pagination2); window.KeyEvent += Window_KeyEvent; }
public CarouselPageTest1Page() { InitializeComponent(); Scroller.ScrollAnimationEnded += OnScrollAnimationEnded; PaginationStyle paginationStyle = new PaginationStyle() { IndicatorSize = new Size(26, 26), IndicatorSpacing = 8, IndicatorImageUrl = new Selector <string> { Normal = ResourcePath + "pagination_ic_nor.png", Selected = ResourcePath + "pagination_ic_sel.png" } }; Index.ApplyStyle(paginationStyle); Index.BackgroundColor = Color.Gray; Index.IndicatorCount = 3; Index.SelectedIndex = 0; }
public void PaginationLastIndicatorImageUrl() { tlog.Debug(tag, $"PaginationLastIndicatorImageUrl START"); PaginationStyle style = new PaginationStyle() { Size = new Size(80, 20), }; var testingTarget = new Pagination(style); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <Pagination>(testingTarget, "Should return Pagination instance."); Selector <String> url = new Selector <string>(); url.Add(ControlState.All, image_path); testingTarget.LastIndicatorImageUrl = url; tlog.Debug(tag, "LastIndicatorImageUrl : " + testingTarget.LastIndicatorImageUrl); testingTarget.Dispose(); tlog.Debug(tag, $"PaginationLastIndicatorImageUrl END (OK)"); }
void createBorads() { board[0] = new TextLabel(); board[0].Size = new Size(300, 50); board[0].PointSize = 15; board[0].HorizontalAlignment = HorizontalAlignment.Center; board[0].VerticalAlignment = VerticalAlignment.Center; board[0].BackgroundColor = Color.Magenta; board[0].Text = "Property construction"; rootContent.Add(board[0]); // Create by Properties pagination[0] = new Pagination(); var path = Tizen.Applications.Application.Current.DirectoryInfo.Resource; var indicatorImageUrlStyle = new PaginationStyle() { IndicatorSize = new Size(26, 26), IndicatorSpacing = 8, IndicatorImageUrl = new Selector <string> { Normal = path + "/pagination/pagination_ic_nor.png", Selected = path + "/pagination/pagination_ic_sel.png" } }; pagination[0].ApplyStyle(indicatorImageUrlStyle); pagination[0].Name = "Pagination1"; pagination[0].Size = new Size(300, 50); pagination[0].BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); pagination[0].IndicatorCount = PAGE_COUNT; pagination[0].SelectedIndex = 0; rootContent.Add(pagination[0]); board[1] = new TextLabel(); board[1].Size = new Size(300, 50); board[1].PointSize = 15; board[1].HorizontalAlignment = HorizontalAlignment.Center; board[1].VerticalAlignment = VerticalAlignment.Center; board[1].BackgroundColor = Color.Magenta; board[1].Text = "Attribute construction"; rootContent.Add(board[1]); // Create by Attributes PaginationStyle style = new PaginationStyle() { IndicatorSize = new Size(15, 15), IndicatorSpacing = 20, IndicatorImageUrl = new Selector <string> { Normal = path + "/pagination/pagination_ic_nor.png", Selected = path + "/pagination/pagination_ic_sel.png" } }; pagination[1] = new Pagination(style); pagination[1].Name = "Pagination2"; pagination[1].Size = new Size(300, 50); pagination[1].BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); pagination[1].IndicatorCount = PAGE_COUNT; pagination[1].SelectedIndex = 0; rootContent.Add(pagination[1]); }
public void Activate() { Window window = NUIApplication.GetDefaultWindow(); // Root layout. layout[0] = new View() { Size = new Size(1920, 1080), BackgroundColor = new Color(0.7f, 0.9f, 0.8f, 1.0f), }; layout[0].Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical, LinearAlignment = LinearLayout.Alignment.Center, CellPadding = new Size(20, 50) }; window.Add(layout[0]); window.KeyEvent += Window_KeyEvent; // A pagination sample created by properties will be added to this layout. layout[1] = new View() { Size = new Size(700, 70), Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Horizontal, LinearAlignment = LinearLayout.Alignment.Center, CellPadding = new Size(20, 50) } }; layout[0].Add(layout[1]); // A pagination sample created by attributes will be added to this layout. layout[2] = new View() { Size = new Size(700, 70), Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Horizontal, LinearAlignment = LinearLayout.Alignment.Center, CellPadding = new Size(20, 50) } }; layout[0].Add(layout[2]); createBorads(); ///////////////////////////////////////////////Create by Properties////////////////////////////////////////////////////////// pagination[0] = new Pagination(); var indicatorImageUrlStyle = new PaginationStyle() { IndicatorSize = new Size(26, 26), IndicatorSpacing = 8, IndicatorImageUrl = new Selector <string> { Normal = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_nor.png", Selected = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_sel.png" } }; pagination[0].ApplyStyle(indicatorImageUrlStyle); pagination[0].Name = "Pagination1"; pagination[0].Size = new Size(300, 50); pagination[0].BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); pagination[0].IndicatorCount = PAGE_COUNT; pagination[0].SelectedIndex = 0; layout[1].Add(pagination[0]); ///////////////////////////////////////////////Create by Attributes////////////////////////////////////////////////////////// PaginationStyle style = new PaginationStyle() { IndicatorSize = new Size(15, 15), IndicatorSpacing = 20, IndicatorImageUrl = new Selector <string> { Normal = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_nor.png", Selected = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_sel.png" } }; pagination[1] = new Pagination(style); pagination[1].Name = "Pagination2"; pagination[1].Size = new Size(300, 50); pagination[1].BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f); pagination[1].IndicatorCount = PAGE_COUNT; pagination[1].SelectedIndex = 0; layout[2].Add(pagination[1]); }