Home Page Icon
Home Page
Table of Contents for
I. Getting Started
Close
I. Getting Started
by Christopher Bennage, Rob Eisenberg
Sams Teach Yourself WPF in 24 Hours
Copyright
Dedication
About the Authors
Acknowledgments
We Want to Hear from You!
Reader Services
Introduction
Audience and Organization
Farther Up and Further In
I. Getting Started
1. What WPF Is and Isn’t
What Is WPF?
Getting to Know the Features of WPF
Declarative UI
Intelligent Layout
Scalable Graphics
Templates
Binding
Styling
Triggers
Animation
3D
Why Use WPF?
Comparing WPF to Other Options
The Pieces of .NET Framework
Tools for WPF
Constrasting WPF with Silverlight
Summary
Q&A
Workshop
Quiz
Answers
2. Understanding XAML
What Is XAML?
The Syntax of XAML
Setting Properties That Aren’t Simple Types
The Content Property
Markup Extensions
Summary
Q&A
Workshop
Quiz
Answers
3. Introducing the Font Viewer
Building the Font Viewer
Setting Up a New Project in Visual Studio 2008
Basic Project Files
What Are Code-Behind Files?
Separating Your Concerns
Renaming a XAML File
Developing the Application
Polishing a Few Things
Summary
Q&A
Workshop
Quiz
Answers
4. Handling Application Layout
Understanding Layout
Layout Panels and Decorators
FrameworkElement
Using Alignment and Margin
Using Panels to Create Dynamic Layouts
Keeping It Simple with StackPanel
Using a StackPanel
Organize Your UI with DockPanel
Attached Properties
Mastering DockPanel
Leveraging the Grid for Ultimate Layout Control
Using a Grid
GridSplitter
Understanding How WrapPanel Works
Exploit Canvas for Precision Layout
Enhancing a UI with Decorators
Building Up a Layout
Summary
Q&A
Workshop
Quiz
Answers
Activities
5. Using Basic Controls
Leveraging Controls
Working with Text
Displaying Rich Text with the TextBlock
Gathering Text from the User
Accessing Controls with a Label
Using Buttons
Triggering Actions with a Button
Making Choices with ToggleButtons
Displaying a List with ListBox
Summary
Q&A
Workshop
Quiz
Answers
Activities
6. Introducing Data Binding
What Is Data Binding?
Understanding the Data Binding Syntax
Binding Two Controls Together
Two-Way Data Binding
Binding to the Collection of Fonts
Introducing DataContext
What Makes Data Binding Work?
Demonstrating Automatic Change Notification
Another Data Binding Syntax
Summary
Q&A
Workshop
Quiz
Answers
II. Reaching the User
7. Designing an Application
Deployment Models in WPF
Converting the Font Viewer to XAML Only
Converting the Font Viewer to an XBAP
Publishing an XBAP
Navigation Models in WPF
User Controls
Summary
Q&A
Workshop
Quiz
Answers
8. Building a Text Document Editor
Designing a Text Editor
Creating the Application Layout
Adding Usability with ToolBars
Increasing Maintainability with User Controls
Using a Menu
Working with RichTextBox
Summary
Q&A
Workshop
Quiz
Answers
Activities
9. Getting a Handle on Events
What Are Routed Events?
Understanding RoutedEventArgs
Using Routed Events
Handling Events in the Text Editor
Making the Text Editor Work as Expected
Preview Events
Summary
Q&A
Workshop
Quiz
Answers
10. Commands
What Are Commands?
Using Commands
Binding Commands to the Menu
Customizing Commands
Adding More Commands to the Text Editor
Determining If a Command Is Available
Creating an Input Binding
Summary
Q&A
Workshop
Quiz
Answers
Activities
11. Output
Making the Text Editor Print
Implementing a Custom Document Paginator
Developing a Print Manager
Adding Print Preview
Outputting Bitmaps
Summary
Q&A
Workshop
Quiz
Answers
Activities
III. Visualizing Data
12. Building a Contact Manager
Design a Contact Manager
Choosing an Architecture
Creating the Solution and Application Shell
Expander
Slider
TabControl
Defining the Model
Abstract the Data Store
Summary
Q&A
Workshop
Quiz
Answers
Activities
13. Presenters and Views
Creating a Custom Base Class for Presenters
Completing the Tab UI Infrastructure
Implementing the Application Presenter
Enhancing the Shell
ScrollViewer
ItemsControl
Building an Edit Contact Screen
Summary
Q&A
Workshop
Quiz
Answers
Activities
14. Resources and Styles
Defining Resources
Color
Combining Resources
Brushes
Using Resources in the UI
Factoring Resource Files
StaticResource Versus DynamicResource
Defining Styles
Using Keyed Styles
Factoring Styles
Summary
Q&A
Workshop
Quiz
Answers
Activities
15. Digging Deeper into Data Binding
Handling Advanced Data Binding Scenarios
Adding the Contact List
Binding Data in Code
Observing Change in Collections
Demonstrating an Observable Collection
Displaying the List View
Data Templates
Formatting Bound Data
Hooking Up a Converter
Converting Back
Parameterizing Converters
Understanding Collection Views
Collection Views and XAML
Summary
Q&A
Workshop
Quiz
Answers
16. Visualizing Lists
The Control Hierarchy
Dissecting ItemsControl
Items
Rendering
ItemContainerGenerator
DataTemplateSelector
StyleSelector
Layout
Customizing the SideBar
Studying Selector
Using Selector
Summary
Q&A
Workshop
Quiz
Answers
Activities
IV. Creating Rich Experiences
17. Building a Media Viewer
Defining the Requirements
Setting Up the Solution
Implementing the Menu Screen
Building the Model
Creating the Picture Screen
Understanding Media
Finalizing the Media Player Functionality
Summary
Q&A
Workshop
Quiz
Answers
Activities
18. Drawing with Shapes
Drawing Basic Shapes
Lines and Strokes
Simple Shapes and Fills
Ellipses and Rectangles
A Header for the Media Viewer
Styling the Media Controls
Paths and Complex Drawings
Stream Geometry
Summary
Q&A
Workshop
Quiz
Answers
Activities
19. Colors and Brushes
Using Colors
Choosing Colors
Introducing Brushes
SolidColorBrush
Leveraging LinearGradientBrush
Working with RadialGradientBrush
Understanding DrawingBrush
Applying a VisualBrush
Summary
Q&A
Workshop
Quiz
Answers
Activities
20. Transforms and Effects
Understanding Transforms
TranslateTransform
SkewTransform
RotateTransform
ScaleTransform
TransformGroup
Differentiating Render and Layout Transforms
Adding Transforms to the Media Viewer
Introducing BitmapEffect
DropShadowBitmapEffect
OuterGlowBitmapEffect
BlurBitmapEffect
EmbossBitmapEffect
BevelBitmapEffect
BitmapEffectGroup
Adding a BitmapEffect to the Media Viewer
Summary
Q&A
Workshop
Quiz
Answers
Activities
21. Using Control Templates
Understanding Control Templates
Placing Content Inside the Template
Telling the Template What to Do
Choosing Panels in Items Controls
Adding Templates to Our Application
Identifying Special Parts in Templates
Creating a Template for a Slider
Creating a Flexible Template
The Benefit of Control Templates
Summary
Q&A
Workshop
Quiz
Answers
Activities
22. Triggers
Leveraging Triggers
Using a DataTrigger
Adding Animation with EventTrigger
Understanding Trigger Restrictions
Advanced Trigger Scenarios
Summary
Q&A
Workshop
Quiz
Answers
Activities
23. Animation
Understanding Animation in General
Understanding Animation in WPF
Making an Animation Tick
Animations in the Media Viewer
Resolving the Target Property
Where to Put Your Animations
Achieving the Desired Effect
Acceleration and Deceleration
What Happens When an Animation Ends?
Making an Animation Repeat
Animating with Key Frames
Animating with a Path
Controlling an Animation
Alternative Animation Techniques
Local Animations
Clock Animations
Manual Animation
Applying Animations to Media Viewer
Summary
Q&A
Workshop
Quiz
Answers
Activities
24. Best Practices
Application Design
Orthogonality
Single Responsibility Principle/Separation of Concerns
Don’t Repeat Yourself
Patterns
Inversion of Control/Dependency Injection
Ya Aren’t Gonna Need It
WPF as an Architecture Example
UI Design and Architecture Concerns
Organization
Model View Presenter (MVP)
Usability
Technical Considerations
UI Layout
Resources
Styles
Templates
Coding Conventions
Code
XAML
Summary
Q&A
Workshop
Quiz
Answers
Activities
V. Appendixes
A. Tools and Resources
Developer Tools
Visual Studio 2008
Kaxaml
Mole
Designer Tools
Expression Blend
Mobiform’s Aurora
ZAM 3D
XAML Converters
2D
3D
Other Formats
Application Frameworks
Caliburn
WPF CAB
Prism
Additional Resources
Icons
B. 3D Tutorial Using ZAM 3D
Understanding the Interface
Creating a Carrot
C. Project Source (downloadable)
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Introduction
Next
Next Chapter
1. What WPF Is and Isn’t
Part I. Getting Started
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset