RelativeLayout doesn't accept 5 arguments

Hello,

I'm trying to follow this documentation:
https://developer.xamarin.com/guides/xamarin-forms/user-interface/layouts/relative-layout/

However, when I try to apply the same code to my stacklayout, I get the error "No overloads for ''Add'' accepts 5 arguments".

Does anybody see what I'm doing wrong?

Thank you.

       _StackLayout.Children.Add(_NavBar, Constraint.RelativeToParent((parent) => {
           return parent.X;
       }), Constraint.RelativeToParent((parent) => {
           return parent.Y * .15;
       }), Constraint.RelativeToParent((parent) => {
           return parent.Width;
       }), Constraint.RelativeToParent((parent) => {
           return parent.Height * .8;
       }));
Tagged:
Sign In or Register to comment.