Data type for binding x and y coordinates in AbsoluteLayout.LayoutBounds in Xamarin Forms

everest8848everest8848 Member ✭✭
edited June 7 in Xamarin.Forms

I have an array of data consisting body parts detail and I am using Absolute Layout.
I only need to provide X and Y coordinates but I don’t want to provide width and height which should be taken automatically.

So, the question is, what should be the DATA TYPE, if we need to bind the X and Y coordinate.

eg
AbsoluteLayout.LayoutBounds="0.80, 0.193"
AbsoluteLayout.LayoutBounds="0.4, 0.21"

Answers

  • LucasZhangLucasZhang Member, Xamarin Team Xamurai
    edited June 10

    AbsoluteLayoutFlags is an enum

    None – interprets all values as absolute. This is the default value if no layout flags are specified.
    All – interprets all values as proportional.
    WidthProportional– interprets the Width value as proportional and all other values as absolute.
    HeightProportional – interprets only the height value as proportional with all other values absolute.
    XProportional – interprets the X value as proportional, while treating all other values as absolute.
    YProportional – interprets the Y value as proportional, while treating all other values as absolute.
    PositionProportional – interprets the X and Y values as proportional, while the size values are interpreted as absolute.
    SizeProportional – interprets the Width and Height values as proportional while the position values are absolute.

    So if you do want to binding the value , the source can only been set as the above type.

Sign In or Register to comment.