Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

.NET

Properties, Dependency Properties, and WPF


Charles has been writing about Windows application programming for over 20 years. His most recent book is Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation, and he is currently working on a book about 3D graphics under the WPF. He can be contacted at www.charlespetzold.com.


Throughout the 20-odd years of its existence, Microsoft Windows has always exhibited a fairly high degree of backward compatibility. With relatively few examples, programs written for one version of Windows continue to run on the next.

Windows Vista continues this trend: It runs programs written for the Win32 API, for the Microsoft Foundation Classes (MFC), for Visual Basic, and for the Windows Forms library of .NET 1.0 and 2.0.

Vista also implements a new application programming interface called the "Windows Presentation Foundation" (WPF), previously known under the codename "Avalon." The WPF is also available under Windows XP with the .NET Framework 3.0 installed. (Alternatively, you can think of WPF as part of .NET 3.0, which can be installed under XP but which is built into Vista.)

Compared with the previous mainstream APIs for Windows, the WPF breaks new ground by implementing two complementary programming interfaces. You can write entire WPF applications in your favorite .NET-compliant programming language such as C# or Visual Basic .NET, but you can also write at least parts of the application using the XML-based Extensible Application Markup Language (XAML, pronounced "zammel").

Although XAML has been classified as a declarative programming language, it is mostly restricted to instantiation and initialization of visual objects. In simple scenarios, you use XAML to define the layout of controls on your windows, and you use code to implement event handlers for these controls. You compile the XAML and code together into an executable.

However, several features of the WPF—such as data binding and animation—let you write interesting XAML files that stand by themselves. These standalone XAML files can be launched under Vista or .NET 3.0 just like other executables, and they run in the web browser.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.