The anchors feature as well as the designer scripts, are based on the visual designer engine. So they can only be used when the layout file is loaded.However, some properties available in the designer scripts are not available elsewhere (Right, Bottom, HorizontalCenter(?), VerticalCenter(?) and so on). That's a Little sad, as they are quite useful. Sure, they are easy to produce from Left and Width et cetera, but for pure code readaility, I would very much prefer if they were available in code as well. Once you start moving things around in code, you tend to get long lines, which would be much neater if those properties existed.