Generally, this has been harder than it needs to be because there’s quite a lot of out of date information out there.

One thing that really threw me was trying to work with responsive layouts. I kept seeing this:

Parent.Width *  
    Switch(Parent.Size,  
        ScreenSize.Small, 0.5,  
        ScreenSize.Medium, 0.3,  
        0.25)

Well, Parent.Size just didn’t want to work for me. I did eventually find out why: Size is a property of Screen controls. So, if you have a Screen control called “Main” Main.Size will get what you want.

Obviously if you’re working with a control that has a Screen as a parent, Parent.Size will work. So, while Parent might be useful shorthand when you’re writing… it’s not when you’re learning.

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)