void InitPrivacyPolicyButton()
        {
            _privacyPolicyButton = new UIButton(new CGRect(0, 0, 0, 50))
            {
                TranslatesAutoresizingMaskIntoConstraints = false
            }; // The frame should not be needed here, but it is since the cornerRadius in StyleUtil is set only once, not dynamically updated on redraw.

            StyleUtil.InitButtonSecondaryStyling(_privacyPolicyButton, ConsentViewModel.CONSENT_SEVEN_BUTTON_TEXT);

            double height = _privacyPolicyButton.TitleLabel.Frame.Height + _privacyPolicyButton.Font.PointSize * 1.5;

            _privacyPolicyButton.Frame = new CGRect(0, 0, 0, height);
            _privacyPolicyButton.HeightAnchor.ConstraintEqualTo((int)height).Active = true;
            _privacyPolicyButton.TouchUpInside += OnPrivacyPolicyPressed;
        }
Example #2
0
        public void SetupStyling()
        {
            StyleUtil.InitButtonStyling(NextBtn, WelcomeViewModel.NEXT_PAGE_BUTTON_TEXT);
            StyleUtil.InitButtonSecondaryStyling(PreviousBtn, WelcomeViewModel.PREVIOUS_PAGE_BUTTON_TEXT);
            SetPreviousButtonHidden(true);

            PageControl.UserInteractionEnabled        = false;
            PageControl.PageIndicatorTintColor        = UIColor.White;
            PageControl.CurrentPageIndicatorTintColor = "#32345C".ToUIColor();
            PageControl.IsAccessibilityElement        = false;

            NextBtn.BackgroundColor = "#32345C".ToUIColor();
            NextBtn.SetTitleColor("#E1EAED".ToUIColor(), UIControlState.Normal);

            PreviousBtn.SetTitleColor("#32345C".ToUIColor(), UIControlState.Normal);
            PreviousBtn.Layer.BorderColor = "#32345C".ToUIColor().CGColor;
        }