Windows Phone Font Positioning With Readable Code
Join the DZone community and get the full member experience.
Join For FreeAn MSDN blog gives us an idea of the complexity that comes with font positioning. The author tries to clean things up for the reader by having a lot of variables to keep the code readable:
Go take a look at the code and download the package to see how the positioning works. It'll take a bit of time to study.
Source: http://blogs.msdn.com/b/devschool/archive/2011/10/31/positioning-fonts-on-the-windows-phone-7-screen.aspx
Lecture for tonights class, which I would like to share with you dear reader, the first part is about how to position fonts on the screen using the least number lines of code. Unfortunately, it requires a lot of variables, but there you go, complexity comes in many forms. Variables are easy to understand, but the code is more messy than I like. But to make neat code requires that the code readers understand what I am trying to do, and that can be difficult.
Here is the end result:
Go take a look at the code and download the package to see how the positioning works. It'll take a bit of time to study.
Source: http://blogs.msdn.com/b/devschool/archive/2011/10/31/positioning-fonts-on-the-windows-phone-7-screen.aspx
Windows Phone
Opinions expressed by DZone contributors are their own.
Comments