advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
CoDe Magazine
Partners & Affiliates
advertisement
advertisement
advertisement
CoDe Magazine
Subscribe to CoDe Magazine
Rate this item | 0 users have rated this item.
Email this articleEmail this article
 
An Overview of Windows Presentation Foundation
Among the numerous new technologies in Vista is the Windows Presentation Foundation (WPF, formerly codenamed Avalon). This article takes you on a whirlwind tour of WPF and shows how you can start preparing for Vista by developing applications today using the available SDK. 

advertisement
indows Presentation Foundation (WPF) is the new graphics subsystem in Windows Vista that will enable developers to build applications that provide breakthrough user experiences. If you look at the applications in use today, they are either Windows applications or Web applications. While Windows applications offer immensely rich client functionality, deploying Windows applications requires considerable resources and makes maintenance a constant challenge. On the other hand, Web applications offers ease of deployment and maintenance, but do so at the expense of increased complexity in the development process (since the Web is stateless) as well as less-than-ideal platform integration.

Microsoft's goal when they created WPF was to offer a development platform that offers the best of both worlds, allowing administrators to deploy and manage applications securely.

While application development technologies have evolved rapidly, hardware advances have also been moving at a rapid rate. In particular, the processing power of video cards has been improving at a much more rapid rate than developers can make use of. Increasingly, computers are equipped with an over-powered graphics subsystem that is under utilized. Applications could jolly well take advantage of the power of these graphics cards (such as for three-dimensional (3-D) processing) to enhance the user experience.

And this is exactly the aim of WPF—that is, to take advantage of the under-utilized power of the video card and use it to enhance the user experience of Windows applications. WPF uses Direct3D for vector-based rendering, enabling applications to incorporate a wide assortment of media such as 2-D, 3-D, audio, text, video, animation, etc.

Installation Procedures
You can try WPF today on Windows XP or Windows Server 2003. To do so, you need to download install the following components:

It is the goal of WPF to offer a development platform that offers the best of both worlds, allowing administrators to deploy and manage applications securely.
  1. Download and install the WinFX SDK. The download contains documentation, samples, and tools designed to help you develop managed applications and libraries using WinFX.
  2. Install the WinFX Runtime Components. This download contains the WinFX Runtime components necessary to run WPF applications.
  3. Install the Visual Studio Extensions for WinFX. This download provides IntelliSense support, project templates, and documentation integration for WinFX in Visual Studio 2005.
Building User Interfaces Using XAML
In WPF, Microsoft introduces a new language for creating WPF applications—XAML (Extensible Application Markup Language). Using XAML, developers can create UIs declaratively using XML elements and attributes. This provides for a clean separation of application logic and the UI of the application, allowing interface designers to use external tools (more on this later) to design the UI and then wire them up with the code-behind files using .NET languages.

Using XAMLPad
To get developers started with XAML, Microsoft provides a useful tool known as XAMLPad. XAMLPad is a XAML editor that allows you to quickly preview your UI. To use XAMLPad, go to Start—>Programs—> Microsoft Windows SDK, then choose Tools, and finally choose XAMLPad. Figure 1 shows the various components in XAMLPad.

 
Figure 1: The various components in XAMLPad.
XAMLPad offers the following functions:

  1. Auto Parse—The Preview Pane (7) will be updated as you type your XAML code in (8)
  2. Refresh—Refreshes the Preview Pane (7)
  3. Changes the font in the Code Edit Pane (8)
  4. Changes the font size in the Code Edit Pane (8)
  5. Hides the Code Edit Pane (8)
  6. Changes the scaling factor of the Preview Pane (7)
  7. Preview Pane
  8. Code Edit Pane
  9. Status bar
To see XAMLPad in action, let's populate the Edit Pane with the XAML code shown below.

   <Canvas xmlns=
     "http://schemas.microsoft.com/winfx/avalon/2005" 
     Background="Ivory" LayoutTransform="scale 1">
   <Label 
     Canvas.Top="10" Canvas.Left="10" 
     BorderBrush="Crimson" BorderThickness="1">
     Image Source
 
Figure 2: Using XAMLPad to preview XAML code.
</Label> <TextBox Canvas.Top="40" Canvas.Left="10" > </TextBox> <Button Canvas.Top="40" Canvas.Left="120" Height="25">OK</Button> <Image Width="400" Canvas.Top="75" Canvas.Left="10" > <Image.Source> <BitmapImage UriSource="C:\Sunset.jpg" /> </Image.Source> </Image> </Canvas>

Figure 2 shows the resulting UI. Notice that the XAML code looks like HTML as all UI controls are defined declaratively.

  Next Page: XAML Layout Patterns
Page 1: IntroductionPage 3: Building WPF Applications with VS 2005
Page 2: XAML Layout PatternsPage 4: Tools, Imaging, and Data Binding
© Copyright Component Developer Magazine and EPS Software Corp., 2006
Untitled
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Intel PDF: Virtualization Delivers Data Center Efficiency
Intel eBook: Managing the Evolving Data Center
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
Symantec eBook: The Guide to E-Mail Archiving and Management
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Seminar: Efficiencies in Hardware/Software Virtualization
HP Webcast: Disaster Recovery Planning
Go Parallel Video: Performance and Threading Tools for Game Developers
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
IBM TCO eKIT: Your IT Budget is Under Attack, Get in Control
IBM Energy Efficiency eKIT: Learn How to Reduce Costs
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Microsoft Article: Silverlight Streaming--Free Video Hosting for All
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
HP Demo: StorageWorks EVA4400
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES