Where are the WPF samples from the Windows SDK installed?

The WPF samples (along with all the other WinFX samples) in the windows SDK are installed as a zipped up file called "allwinfxsamples.zip" that is located at "C:\Program Files\Microsoft SDKs\Windows\v1.0\samples" (assuming you installed the SDK to its default location). There are lots of useful samples organized by topic, with sample code in VB.NET/C# and XAML. If you need to find out how to do something with the latest release these samples are often your best source of information because they should all work against that version of WPF you have installed. »

Author image

I've heard about this WPF 'content model' - what is it?

WPF's content model is usually described as either rich or flexible - but what does the term "content model" mean in this context? Legacy windows programming platforms (MFC,ATL,VB6,Windows Forms etc) had many different types of controls that could be added to UI - buttons, labels, pictures, text boxes, lists etc. Each one of these types of controls usually had a fairly fixed set of things they could display - buttons, labels and text boxes could contain text, picture controls could contain images, lists contained a number of list items, each of which in turn contained text. »

Author image

How do I allow the user to resize a region of a form in WPF using just XAML?

In a previous how-to we looked at how to use a ScaleTransform to allow the user to re-size a region of a form using a slider control. When the value of the slider changed some C# code in the event handler created a new ScaleTransform, set its ScaleX and ScaleY values based on the value of the slider, and then assigned the ScaleTransform to the LayoutTransform of the item we wanted to re-size. »

Author image

What do I need to install to get started building WPF applications?

WPF is built on top of the .NET framework 2.0, so the very first thing you will need is Framework 2.0 if you don't already have it. To begin developing WPF applications you need to download the February CTP of the WinFx components (WPF is a part of a larger package of new components for windows called WinFx). You can download the February CTP of the WinFX runtime components from here. »

Author image

How do I allow the user to resize a region of a form in WPF?

Many WPF applications allow a region of the form to be re-sized by the user by moving a slider control. This is a great feature for users with poor vision, who can resize regions of the form to a size that suits them, and also shows WPF's vector-based graphics system off to great effect. So how is this achieved? Sizing the UI relies on the ScaleTransform class in WPF. As the name suggests a ScaleTransform allows a specific UIElement and its children to be re-sized, either at the layout or at the render stage. »

Author image

Book Review - Programming Windows Presentation Foundation

Authors: Chris Sells & Ian Griffiths Publisher: O'Reilly ISBN: 0-596-10113-9 buy from Amazon Overview: Chris Sells and Ian Griffiths, experts and authors in the Windows Forms arena (and before that MFC and ATL) have written the best WPF book on the market*. At 420 pages the book is slimmer than the authors’ past forays into Windows Forms, but still does a great job of covering the main aspects of WPF. The book was written against the beta 1 version of WPF, and there have been substantial changes to some parts of WPF since it was written. »

Author image

What do I need to install to develop WPF applications?

WPF is built on top of the .NET framework 2.0, so the very first thing you will need is Framework 2.0 if you don't already have it. To begin developing WPF applications you need to download the January CTP of the WinFx components (WPF is a part of a larger package of new components for windows called WinFx). You can download the WinFx January CTP from here. The installer is quite small, but is really only a small startup program that does not contain the full set of WinFx components. »

Author image

Welcome to LearnWPF

Welcome to LearnWPF - a community site to help people learn about Windows Presentation Foundation (WPF). WPF was introduced at the Professional Developers Conference (PDC) 2003 under the name Avalon. It is a new presentation layer for WIndows XP, 2003 and Vista that leverages the power of modern GPUs, allows developers and designers to use xml-base markup to define UI, and includes a number of great features for making captivating UIs. »

Author image