2 Replies - 470 Views - Last Post: 21 May 2017 - 06:34 PM

#1 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Confused with the positioning of this label

Posted 18 May 2017 - 06:40 PM

I am doing this exercise part of it is we do absoluteLayout and this code here is perfect for what I need:

    <AbsoluteLayout>

        <StackLayout HorizontalOptions="Center" AbsoluteLayout.LayoutBounds="0, 0, 1, 0.3" AbsoluteLayout.LayoutFlags="All">
            <Label Text="Relax" FontSize = "30"/>
        </StackLayout>

    </AbsoluteLayout>




But my question is yo have HorizontalOptions="Center" that sets it to the center horizontally then we have "AbsoluteLayout.LayoutBounds="0, 0, 1, 0.3" which also changes its position so which one overrides which? because on layoutBounds we set x and y to 0 so shouldn't it be in the corner?

Is This A Good Question/Topic? 1
  • +

Replies To: Confused with the positioning of this label

#2 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Confused with the positioning of this label

Posted 18 May 2017 - 08:10 PM

Another thing as I am putting images inside the AbsoluteLayout it doesn't fill up the screen unless I include these properties " AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All"

I don't get it we set the aspect to aspect fill. If I remove everything and only have the image then I don't need those extra properties. Is the AbsoluteLayout resetting values or something?
Was This Post Helpful? 0
  • +
  • -

#3 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Confused with the positioning of this label

Posted 21 May 2017 - 06:34 PM

bump
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1