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 *

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.