DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Windows Phone Font Positioning With Readable Code

Windows Phone Font Positioning With Readable Code

Mitch Pronschinske user avatar by
Mitch Pronschinske
·
Nov. 03, 11 · Mobile Zone · Interview
Like (0)
Save
Tweet
3.91K Views

Join the DZone community and get the full member experience.

Join For Free
An 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:

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:

image



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.

Popular on DZone

  • An Overview of 3 Java Embedded Databases
  • How to Optimize MySQL Queries for Speed and Performance
  • Enough Already With ‘Event Streaming’
  • Choosing Between REST and GraphQL

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo