Ejemplo n.º 1
0
        public TabButton(string tabText, int tabIndex, Color primaryColor,
                         Color secondaryColor, bool isSelectedByDefault)
        {
            InitializeComponent();

            // Set up default text values
            TabText        = tabText;
            TabIndex       = tabIndex;
            PrimaryColor   = primaryColor;
            SecondaryColor = secondaryColor;

            TabLabelView.Text = TabText;

            // set up ios vertical separator
            // visibility based on index
            if (Device.RuntimePlatform == Device.iOS && TabIndex != 0)
            {
                VerticalSeparator.IsVisible = true;
            }

            if (Device.RuntimePlatform == Device.UWP)
            {
                TabLabelView.Opacity = 0.35;
            }

            // Set up default color values
            SetUpColorScheme();

            // set up selected status
            if (isSelectedByDefault)
            {
                TabButtonView.SendClicked();
            }
        }
Ejemplo n.º 2
0
        public TabButton(string tabText, int tabIndex, Color primaryColor,
                         Color secondaryColor, bool isSelectedByDefault)
        {
            InitializeComponent();

            TabText        = tabText;
            TabIndex       = tabIndex;
            PrimaryColor   = primaryColor;
            SecondaryColor = secondaryColor;

            TabLabelView.Text = TabText;

            SetUpColorScheme();

            if (isSelectedByDefault)
            {
                TabButtonView.SendClicked();
            }
        }
Ejemplo n.º 3
0
        public GistInfoController(string id)
            : base(true, true)
        {
            Id    = id;
            Style = MonoTouch.UIKit.UITableViewStyle.Plain;
            Title = "Gist";

            _tabButtons = new TabButtonView(new RectangleF(0, 0, this.TableView.Bounds.Width, 42), "Files", "Comments", "Forks");
            _tabButtons.SegmentChanged = SegmentedChanged;

            //The bottom bar
            ToolbarItems = new []
            {
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace),
                new UIBarButtonItem((_starButton = ToolbarButton.Create(Images.Buttons.Star, StarButtonPress))),
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace),
                new UIBarButtonItem(ToolbarButton.Create(Images.Buttons.User, UserButtonPress)),
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace),
                new UIBarButtonItem(ToolbarButton.Create(Images.Buttons.Comment, CommentButtonPress)),
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace),
                (_shareButton = new UIBarButtonItem(ToolbarButton.Create(Images.Buttons.Share, ShareButtonPress))),
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace)
            };
        }