Beispiel #1
0
        protected override void ApplyConstraints()
        {
            View.BackgroundColor = UIColor.FromRGB(230, 229, 228);
            View.AddConstraints(
                _labelEmployee.AtTopOf(View, topPading),
                _labelEmployee.AtLeftOf(View, UIScreen.MainScreen.Bounds.Width / 9),
                _labelEmployee.Width().EqualTo(buttonWidth),
                _labelEmployee.Height().EqualTo(buttonHight),

                _employee.AtTopOf(View, topPading),
                _employee.AtRightOf(View, UIScreen.MainScreen.Bounds.Width / 9),
                _employee.WithSameTop(_labelEmployee),
                _employee.Width().EqualTo(buttonWidth),
                _employee.Height().EqualTo(buttonHight),

                _labelVacationType.Below(_labelEmployee),
                _labelVacationType.WithSameLeft(_labelEmployee),
                _labelVacationType.WithSameWidth(_labelEmployee),
                _labelVacationType.WithSameHeight(_labelEmployee),

                _vacationType.Below(_employee),
                _vacationType.WithSameLeft(_employee),
                _vacationType.WithSameWidth(_employee),
                _vacationType.WithSameHeight(_employee),

                _labelApprover.Below(_labelVacationType),
                _labelApprover.WithSameLeft(_labelVacationType),
                _labelApprover.WithSameWidth(_labelVacationType),
                _labelApprover.WithSameHeight(_labelVacationType),

                _approver.Below(_vacationType),
                _approver.WithSameLeft(_vacationType),
                _approver.WithSameWidth(_vacationType),
                _approver.WithSameHeight(_vacationType),

                _vacationError.Below(_vacationType, spacing),
                _vacationError.AtLeftOf(View),
                _vacationError.Width().EqualTo(UIScreen.MainScreen.Bounds.Width),
                _vacationError.Height().EqualTo(buttonHight),

                _vacationStartDateBtn.Below(_vacationError),
                _vacationStartDateBtn.WithSameCenterX(View),
                _vacationStartDateBtn.Width().EqualTo(UIScreen.MainScreen.Bounds.Width).Minus((UIScreen.MainScreen.Bounds.Width / 9) * 2),
                _vacationStartDateBtn.Height().EqualTo(datepickerHeigh),

                _vacationEndDateBtn.Below(_vacationStartDateBtn),
                _vacationEndDateBtn.WithSameCenterX(View),
                _vacationEndDateBtn.Width().EqualTo(UIScreen.MainScreen.Bounds.Width).Minus((UIScreen.MainScreen.Bounds.Width / 9) * 2),
                _vacationEndDateBtn.Height().EqualTo(datepickerHeigh),

                _labelDuration.Below(_vacationEndDateBtn),
                _labelDuration.WithSameLeft(_labelVacationType),
                _labelDuration.WithSameWidth(_labelVacationType),
                _labelDuration.WithSameHeight(_labelVacationType),

                _duration.Below(_vacationEndDateBtn),
                _duration.WithSameLeft(_vacationType),
                _duration.WithSameWidth(_vacationType),
                _duration.WithSameHeight(_vacationType),

                _labelVacationStatus.Below(_labelDuration),
                _labelVacationStatus.WithSameLeft(_labelVacationType),
                _labelVacationStatus.WithSameWidth(_labelVacationType),
                _labelVacationStatus.WithSameHeight(_labelVacationType),

                _vacationStatus.Below(_duration),
                _vacationStatus.WithSameLeft(_vacationType),
                _vacationStatus.WithSameWidth(_vacationType),
                _vacationStatus.WithSameHeight(_vacationType),

                _labelAttachments.Below(_vacationStatus),
                _labelAttachments.AtLeftOf(View),
                _labelAttachments.Width().EqualTo(UIScreen.MainScreen.Bounds.Width),
                _labelAttachments.Height().EqualTo(buttonHight),

                _vacationPickImageFromGallery.Below(_labelAttachments),
                _vacationPickImageFromGallery.WithSameLeft(_labelVacationType),
                _vacationPickImageFromGallery.WithSameWidth(_labelVacationType),
                _vacationPickImageFromGallery.WithSameHeight(_labelVacationType),

                _vacationPickImageFromCamera.Below(_labelAttachments),
                _vacationPickImageFromCamera.WithSameLeft(_vacationType),
                _vacationPickImageFromCamera.WithSameWidth(_vacationType),
                _vacationPickImageFromCamera.WithSameHeight(_vacationType),

                _vacationImage.Below(_vacationPickImageFromGallery, spacing),
                _vacationImage.WithSameCenterX(_labelAttachments),
                _vacationImage.Width().EqualTo(imagesize),
                _vacationImage.Height().EqualTo(imagesize)
                );
        }