Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 1.072 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
1.072
Dung lượng
15,39 MB
Nội dung
this print for content only—size & color not accurate spine = 2.005" 1,072 page count Books for professionals By professionals ® Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, SECOND EDITION Dear Reader, For years, .NET developers have created Windows applications with the Windows Forms toolkit. And though Windows Forms is mature and reasonably full-featured, it’s hardwired to essential bits of Windows plumbing that haven’t changed much in the past ten years. As a result, some tasks that should be easy require a lot of work. The Windows Presentation Foundation (WPF) changes all this by introduc- ing a new model with entirely different plumbing. Although WPF includes the standard controls you’re familiar with, it draws every detail itself, using the high-performance DirectX engine. As a result, WPF can provide a whole host of eye-popping new features, all of which we’ll cover in this book. For example, we’ll give common controls like buttons a slick, customized look without writ- ing a line of code. Similarly, we will craft animated effects that rotate, stretch, scale, and skew anything in your user interface right before the user’s eyes. Tasks that would have been difficult or nearly impossible in Windows Forms— such as playing media files or creating texture-mapped 3-D shapes—are finally possible. By the time you’ve finished this book, you’ll have mastered these pre- viously impossible tasks. Although WPF’s video, animation, and 3-D features get the most hype, WPF is just as useful for building business applications that don’t need rich graphics. We’ll cover WPF’s enhancements of key business features such as data binding, print management, and document display, giving you all you need to create professional business applications in WPF. Welcome aboard! Matthew MacDonald (Microsoft MVP, MCSD) Author of Pro .NET 2.0 Windows Forms and Custom Controls (Apress) Pro .NET 2.0 Windows Forms and Custom Controls in VB 2005 (Apress) Pro ASP.NET 3.5 in C# 2008 (Apress, with Mario Szpuszta) Pro WPF: Windows Presentation Foundation in .NET 3.0 (Apress) US $54.99 Shelve in Programming/Microsoft/.NET User level: Intermediate–Advanced MacDonald SECOND EDITION WPF The eXperT’s Voice ® in .neT Pro WPF in C# 2008 Windows Presentation Foundation with .NET 3.5 SECOND EDITION cyan MaGenTa yelloW Black panTone 123 c Matthew MacDonald Companion eBook Available THE APRESS ROADMAP Illustrated C# 2008 Beginning C# 2008 Pro LINQ Pro WPF in C# 2008, Second Edition Beginning C# 2008 Databases Beginning XML with C# 2008 Beginning VB 2008 Databases Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition Pro ASP.NET 3.5 in C# 2008, Second Edition www.apress.com SOURCE CODE ONLINE Companion eBook See last page for details on $10 eBook version ISBN-13: 978-1-59059-955-6 ISBN-10: 1-59059-955-1 9 781590 599556 5 5 4 9 9 Create the next generation of Windows applications. Pro in C# 2008 [...]... Manipulating the Pages in a Document Printout 708 Custom Printing 710 Printing with the Visual Layer Classes 711 Custom Printing with Multiple Pages 714 Print Settings and Management 719 Maintaining Print Settings 720 Printing Page Ranges... ■MATTHEW MACDONALD is an author, educator, and Microsoft MVP in Windows client development He’s a regular contributor to programming journals and the author of more than a dozen books about NET programming, including Pro NET 2.0 Windows Forms and Custom Controls in C# (Apress, 2005) and Pro ASP NET 3.5 in C# 2008 (Apress, 2007) He lives in Toronto with his wife and daughter xxii 9551CH00 2/8/08 1:40... control getting its own piece of real estate As a result, there’s no good way for the painting in one control (for example, the glow effect behind a button) to spread into the area owned by another control And don’t even think about introducing animated effects such as spinning text, shimmering buttons, shrinking windows, or live previews because you’ll have to paint every detail by hand The Windows Presentation... warnings and irritating installation prompts Overall, WPF combines the best of the old world of Windows development with new innovations for building modern, graphically rich user interfaces Although Windows Forms applications will continue to live on for years, developers embarking on new Windows development projects should consider WPF ■ If you’ve done a substantial amount of work creating a Windows... that appeal directly to business developers, including a vastly improved data binding xxv 9551CH00 xxvi 2/8/08 1:40 PM Page xxvi ■INTRODUCTION model, a new set of classes for printing content and managing print queues, and a document feature for displaying large amounts of formatted text You’ll even get a new model for building page-based applications that run seamlessly in Internet Explorer and can... performs custom drawing Chapter 25: Interacting with Windows Forms examines how you can combine WPF and Windows Forms content in the same application—and even in the same window Chapter 26: Multithreading and Add-Ins describes two advanced topics You’ll use multithreading to create responsive WPF applications that perform time-consuming work in the background You’ll use the add -in model to create an extensible... 20 Printing 697 Basic Printing 697 Printing an Element 698 Transforming Printed Output 701 Printing Elements Without Showing Them 703 Printing a Document 704 Manipulating the... helpful individuals I’m deeply indebted to the whole Apress team, including Sofia Marchant and Laura Esterman, who shepherded this second edition through production, Kim Wimpsett, who speedily performed the copy edit, and many other individuals who worked behind the scenes indexing pages, drawing figures, and proofreading the final copy I also owe a special thanks to Gary Cornell, who always offers invaluable... 491 Binding to the Properties of an Element 491 Creating Bindings with Code 495 Multiple Bindings 496 9551CH00 2/8/08 1:40 PM Page xv ■CONTENTS Binding Direction 499 Binding Updates 502 Binding to Objects That... 6 Dependency Properties and Routed Events 137 Understanding Dependency Properties 137 Defining and Registering a Dependency Property 138 How WPF Uses Dependency Properties 147 Understanding Routed Events 149 Defining and Registering a Routed Event 149 Attaching an Event . ROADMAP Illustrated C# 2008 Beginning C# 2008 Pro LINQ Pro WPF in C# 2008, Second Edition Beginning C# 2008 Databases Beginning XML with C# 2008 Beginning VB 2008 Databases Pro C# 2008 and the .NET 3.5. Controls in VB 2005 (Apress) Pro ASP.NET 3.5 in C# 2008 (Apress, with Mario Szpuszta) Pro WPF: Windows Presentation Foundation in .NET 3.0 (Apress) US $54.99 Shelve in Programming/Microsoft/.NET User. 5 4 9 9 Create the next generation of Windows applications. Pro in C# 2008