void AddTabToSubContainer(int indexOfContainer, Model model)
        {
            ScrollTabView tabView = new ScrollTabView ();
            tabView.Text = model.name;
            tabView.Image = model.image;

            int xPosition = leftMargin + (int)(tabView.Frame.Width * indexOfContainer) + (padding * indexOfContainer);

            tabView.Frame = new CGRect (xPosition, 20, tabView.Frame.Width, tabView.Frame.Height);

            scrollView.AddSubview (tabView);

            tabView.TouchUpInside += (sender, e) => {
                LoadTabContent (sender as UIView);
            };

            scrollTabs.Add (tabView);
        }
Example #2
0
        void AddTabToSubContainer(int indexOfContainer, Model model)
        {
            ScrollTabView tabView = new ScrollTabView();

            tabView.Text  = model.name;
            tabView.Image = model.image;

            int xPosition = leftMargin + (int)(tabView.Frame.Width * indexOfContainer) + (padding * indexOfContainer);

            tabView.Frame = new CGRect(xPosition, 20, tabView.Frame.Width, tabView.Frame.Height);

            scrollView.AddSubview(tabView);

            tabView.TouchUpInside += (sender, e) => {
                LoadTabContent(sender as UIView);
            };

            scrollTabs.Add(tabView);
        }