#5 – Vector Graphics and Resolution Independence

In WPF, you render things using vector graphics, rather than bitmaps.  This is true both of built-in controls and custom controls that you create.

Instead of coming up with a bitmap pattern that specifies every pixel to be drawn on the screen, you draw elements using basic graphical primitives, e.g. shapes, lines, and polygons.

Because WPF uses vector graphics, user interface elements will be rendered independently from actual device resolution.  The size of graphical elements in WPF is specified using device independent units, where each unit is 1/96th of an inch.  This means that user interface elements will always render at the specified size and not be affected by the pixel density (DPI) of an output device.

Advertisement

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

3 Responses to #5 – Vector Graphics and Resolution Independence

  1. adi says:

    can you suggest any book for learning WPF. I am a Visual basic developer(new)

  2. Pingback: #515 – Zooming In and Out on the Artboard « 2,000 Things You Should Know About WPF

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: