Ejemplo n.º 1
0
        protected override void ConstrainChildren()
        {
            base.ConstrainChildren();

            ActivityIndicator.SafeLeadingAnchor().ConstraintEqualTo(this.SafeLeadingAnchor(), Toast.Layout.PaddingLeading).Active = true;
            ActivityIndicator.SafeCenterYAnchor().ConstraintEqualTo(this.SafeCenterYAnchor()).Active = true;
            ActivityIndicator.SafeBottomAnchor().ConstraintLessThanOrEqualTo(this.SafeBottomAnchor(), -Toast.Layout.PaddingBottom).Active = true;
            ActivityIndicator.SafeTopAnchor().ConstraintGreaterThanOrEqualTo(this.SafeTopAnchor(), Toast.Layout.PaddingTop).Active        = true;

            TitleLabel.SafeTrailingAnchor().ConstraintEqualTo(this.SafeTrailingAnchor(), -Toast.Layout.PaddingTrailing).Active           = true;
            TitleLabel.SafeLeadingAnchor().ConstraintEqualTo(ActivityIndicator.SafeTrailingAnchor(), Toast.Layout.PaddingLeading).Active = true;
            TitleLabel.SafeTopAnchor().ConstraintEqualTo(this.SafeTopAnchor(), Toast.Layout.PaddingTop).Active          = true;
            TitleLabel.SafeBottomAnchor().ConstraintEqualTo(MessageLabel.SafeTopAnchor(), -Toast.Layout.Spacing).Active = true;

            MessageLabel.SafeLeadingAnchor().ConstraintEqualTo(ActivityIndicator.SafeTrailingAnchor(), Toast.Layout.PaddingLeading).Active = true;
            MessageLabel.SafeTrailingAnchor().ConstraintEqualTo(this.SafeTrailingAnchor(), -Toast.Layout.PaddingTrailing).Active           = true;
            MessageLabel.SafeBottomAnchor().ConstraintEqualTo(this.SafeBottomAnchor(), -Toast.Layout.PaddingBottom).Active = true;
        }