Programming WPF. Building Windows UI with Windows Presentation Foundation. 2nd Edition - Helion
ISBN: 978-05-965-5479-8
stron: 864, Format: ebook
Data wydania: 2007-08-28
Księgarnia: Helion
Cena książki: 143,65 zł (poprzednio: 167,03 zł)
Oszczędzasz: 14% (-23,38 zł)
If you want to build applications that take full advantage of Windows Vista's new user interface capabilities, you need to learn Microsoft's Windows Presentation Foundation (WPF). This new edition, fully updated for the official release of .NET 3.0, is designed to get you up to speed on this technology quickly. By page 2, you'll be writing a simple WPF application. By the end of Chapter 1, you'll have taken a complete tour of WPF and its major elements.
WPF is the new presentation framework for Windows Vista that also works with Windows XP. It's a cornucopia of new technologies, which includes a new graphics engine that supports 3-D graphics, animation, and more; an XML-based markup language, called XAML, for declaring the structure of your Windows UI; and a radical new model for controls.
This second edition includes new chapters on printing, XPS, 3-D, navigation, text and documents, along with a new appendix that covers Microsoft's new WPF/E platform for delivering richer UI through standard web browsers -- much like Adobe Flash. Content from the first edition has been significantly expanded and modified. Programming WPF includes:
- Scores of C# and XAML examples that show you what it takes to get a WPF application up and running, from a simple "Hello, Avalon" program to a tic-tac-toe game
- Insightful discussions of the powerful new programming styles that WPF brings to Windows development, especially its new model for controls
- A color insert to better illustrate WPF support for 3-D, color, and other graphics effects
- A tutorial on XAML, the new HTML-like markup language for declaring Windows UI
- An explanation and comparison of the features that support interoperability with Windows Forms and other Windows legacy applications
WPF represents the best of the control-based Windows world and the content-based web world. Programming WPF helps you bring it all together.
Osoby które kupowały "Programming WPF. Building Windows UI with Windows Presentation Foundation. 2nd Edition", wybierały także:
- MVVM i XAML w Visual Studio 2015 57,74 zł, (17,90 zł -69%)
- Platforma Xamarin. Kurs video. Poziom drugi. Zaawansowane techniki tworzenia aplikacji cross-platform 99,00 zł, (39,60 zł -60%)
- WPF. Kurs video. Om 219,00 zł, (98,55 zł -55%)
- Język XAML. Kurs video. Poziom pierwszy. Programowanie aplikacji w WPF 59,00 zł, (26,55 zł -55%)
- Visual Studio 2017. Tworzenie aplikacji Windows w języku C# 89,00 zł, (44,50 zł -50%)
Spis treści
Programming WPF. Building Windows UI with Windows Presentation Foundation. 2nd Edition eBook -- spis treści
- Programming WPF, 2nd Edition
- SPECIAL OFFER: Upgrade this ebook with OReilly
- A Note Regarding Supplemental Files
- Forewords
- First Edition
- Second Edition
- Preface
- Who This Book Is For
- How This Book Is Organized
- What You Need to Use This Book
- Conventions Used in This Book
- Using Code Examples
- How to Contact Us
- Safari Books Online
- Ians Acknowledgments
- Chris's Acknowledgments
- 1. Hello, WPF
- WPF from Scratch
- Building Applications
- WPF Applications
- XAML
- Editing XAML
- XAML Browser Applications (XBAPs)
- Content Models
- XAML Property Element Syntax
- Layout
- Grid Layout
- XAML Attached Property Syntax
- Controls
- Data Binding
- XAML Markup Extensions
- Data Templates
- Dependency Properties
- Resources
- XAML Namespace Mapping Syntax
- Styles
- Animation
- Control Templates
- Graphics
- 3D
- Documents and Printing
- Where Are We?
- WPF from Scratch
- 2. Applications and Settings
- Application Lifetime
- Explicit Application Creation
- Application Access
- Implicit Application Creation
- Top-Level Windows
- Application Shutdown Modes
- Application Events
- Startup event
- Activated and Deactivated events
- DispatcherUnhandledException event
- SessionEnding event
- Exit event
- Application Instancing
- Single instance applications
- Other Application Services
- Application Deployment
- Simple Publishing
- The User Experience
- WPF ClickOnce Specifics
- Settings
- Designing Settings
- Using Settings
- Integrating Settings with WPF
- Where Are We?
- Application Lifetime
- 3. Layout
- Layout Basics
- StackPanel
- WrapPanel
- DockPanel
- Grid
- Column Widths and Row Heights
- Spanning Multiple Rows and Columns
- Consistency Across Multiple Grids
- UniformGrid
- Canvas
- Viewbox
- Common Layout Properties
- Width and Height
- MinWidth, MaxWidth, MinHeight, and MaxHeight
- HorizontalAlignment and VerticalAlignment
- Margin
- Padding
- Visibility
- FlowDirection
- Panel.ZIndex
- RenderTransform and LayoutTransform
- When Content Doesn't Fit
- ScrollViewer
- Scrollable Region and IScrollInfo
- Custom Layout
- Where Are We?
- 4. Input
- Routed Events
- Halting Event Routing
- Determining the Target
- Routed Events and Normal Events
- Attached Events
- Mouse Input
- Mouse Input and Hit Testing
- Mouse State
- Keyboard Input
- Keyboard State
- Ink Input
- Commands
- Command Objects
- Defining commands
- Using commands in XAML
- Input Bindings
- Command Source
- Command Bindings
- Enabling and disabling commands
- Command routing
- Command Objects
- Code-Based Input Handling Versus Triggers
- Where Are We?
- Routed Events
- 5. Controls
- What Are Controls?
- Buttons
- Slider and Scroll Controls
- ProgressBar
- Text Controls
- Label
- ToolTip
- GroupBox and Expander
- List Controls
- List View
- Tree View
- Menus
- Toolbars
- GridSplitter
- Where Are We?
- 6. Simple Data Binding
- Without Data Binding
- Object Changes
- UI Changes
- Data Binding
- Bindings
- Implicit Data Source
- Data Islands
- Explicit Data Source
- Binding to Other Controls
- Value Conversion
- Editable Value Conversion
- Validation
- Custom validation rules
- Binding Path Syntax
- Relative Sources
- Update Source Trigger
- Debugging Data Binding
- Where Are We?
- Without Data Binding
- 7. Binding to List Data
- Binding to List Data
- Current Item
- Getting the current item
- Navigating between items
- List Data Targets
- Display Members, Value Members, and Look-Up Bindings
- Data Templates
- Typed data templates
- DataTemplates and the DataContext
- List Changes
- Sorting
- Default Collection Views
- Filtering
- Grouping
- Declarative Sorting and Grouping
- Current Item
- Data Source Providers
- Object Data Provider
- Asynchronous data retrieval
- Passing parameters
- Binding to Relational Data
- XML Data Source Provider
- XML data islands
- XML binding without the data source provider
- Object Data Provider
- Master-Detail Binding
- Hierarchical Binding
- Where Are We?
- Binding to List Data
- 8. Styles
- Without Styles
- Inline Styles
- Named Styles
- The Target Type Attribute
- Reusing Styles
- Overriding Style Properties
- Extending Styles
- Setting Styles Programmatically
- Element-Typed Styles
- Element-Typed Styles and Derived Types
- Data Templates and Styles
- Data Templates Redux
- Data Templates with Style
- Triggers
- Property Triggers
- Multiple Triggers
- Multicondition Property Triggers
- Data Triggers
- Multicondition Data Triggers
- Event Triggers
- Where Are We?
- 9. Control Templates
- Beyond Styles
- Control Templates and Styles
- Template Binding
- Content Presenters
- Template Triggers
- Extending Templates
- Repurposing an existing property
- Defining a custom dependency property
- The Control Template Contract
- Property binding
- Named parts
- Content placeholders
- Placeholders indicated by properties
- Special-Purpose Elements
- Examining the Built-in Templates
- Logical and Visual Trees
- Data-Driven UI
- Where Are We?
- Beyond Styles
- 10. Windows and Dialogs
- Window
- Window Look and Feel
- Window Lifetime
- Window Location and Size
- Window Owners
- Window Visibility and State
- Dialogs
- Common Dialogs
- Available common dialogs
- Custom Dialogs
- Dialog look and feel
- Dialog data exchange
- Handling OK and Cancel
- Data validation
- Modeless dialogs
- Common Dialogs
- Where Are We?
- Window
- 11. Navigation
- NavigationWindow
- Pages
- Loose XAML
- Fragment Navigation
- Page Lifetime
- Passing Data Between Pages
- Page Functions
- Frames
- XBAPs
- XBAP Publication and Deployment
- Navigation to HTML
- Where Are We?
- 12. Resources
- Creating and Using Resources
- Resource Scope
- Defining custom system-scope resources
- Using system-scope resources
- Resource References
- Reusing Drawings
- Resource Scope
- Resources and Styles
- Skins and Themes
- Binary Resources
- Binary Resources and the Application Class
- Pack URIs
- Global Applications
- Building Localizable Applications with XAML
- Where Are We?
- Creating and Using Resources
- 13. Graphics
- Graphics Fundamentals
- Integration
- Drawing Object Model
- Resolution Independence
- Scaling and rotation
- Resolution, coordinates, and "pixels"
- Shapes, Brushes, and Pens
- Composition
- Shapes
- Base Shape Class
- Rectangle
- Ellipse
- Line
- Polyline
- Polygon
- Path
- Bézier curves
- Combining shapes
- Path geometry text format
- Bitmaps
- Image
- ImageSource
- Creating Bitmaps
- Bitmap Encoders and Decoders
- Bitmap Effects
- Brushes and Pens
- Color
- SolidColorBrush
- LinearGradientBrush
- RadialGradientBrush
- ImageBrush, DrawingBrush, and VisualBrush
- TileBrush
- ImageBrush
- DrawingBrush
- VisualBrush
- Pen
- Transformations
- Visual Layer Programming
- Rendering On Demand
- Where Are We?
- Graphics Fundamentals
- 14. Text and Flow Documents
- Fonts and Text Styles
- Common Text Properties
- Fonts and Font Families
- FontSize
- Stretch
- Style
- Weight
- Decorations
- Text Trimming
- Text Wrapping and Hyphenation
- Text Alignment
- Text and the User Interface
- TextBlock
- Label and AccessText
- Flow Documents and Viewer Controls
- Visual Layer Text
- Glyph runs
- FormattedText
- Glyphs
- TextBlock
- Text Object Model
- Inline
- Run
- Span
- LineBreak
- InlineUIContainer
- Block
- Paragraph
- List
- Table
- Section
- BlockUIContainer
- Figures and Floaters
- Images
- Text and Data Binding
- Coding with the Text Object Model
- TextPointer
- Inline
- Typography
- Where Are We?
- Fonts and Text Styles
- 15. Printing and XPS
- XPS
- Open Packaging Conventions
- XPS Document Classes
- FixedDocumentSequence
- FixedDocument
- FixedPage
- Page sizing
- Page content limitations
- Fonts, bitmaps, and other resources
- Generating XPS Output
- Printing Fixed Documents
- Printing Visuals
- Printing with Document Paginators
- Asynchronous Printing
- XPS File Generation Features
- Package-Level XPS API
- Core Document Properties
- Thumbnails
- Hyperlinks
- Compression
- System.Printing
- PrintQueue
- PrintServer
- PrintSystemJobInfo
- PrintTicket and PrintCapabilities
- PrintDialog
- Media Description
- Displaying Fixed Documents
- Where Are We?
- XPS
- 16. Animation and Media
- Animation Fundamentals
- Animation Types
- IAnimatable
- Triggers
- Timelines
- Hierarchy
- Duration
- Repetition
- Filling
- Speed
- Keyframe Animations
- Path Animations
- Clocks and Control
- Controlling Animations with Storyboards
- Controlling Animations with Clocks
- Transition Animations
- Audio and Video
- Simple Media Playback
- Using MediaElement in Clock Mode
- Slipping
- Where Are We?
- Animation Fundamentals
- 17. 3D Graphics
- 3D Content in a 2D World
- Cameras
- Models
- Geometry3D
- Materials
- DiffuseMaterial
- SpecularMaterial
- EmissiveMaterial
- MaterialGroup
- ModelVisual3D
- Lights
- AmbientLight
- DirectionalLight
- PointLight
- SpotLight
- Textures
- Transforms
- TranslateTransform3D
- ScaleTransform3D
- RotateTransform3D
- Transform3DGroup
- MatrixTransform3D
- 3D Data Visualization
- Hit Testing
- Where Are We?
- 18. Custom Controls
- Custom Control Basics
- Choosing a Base Class
- Custom Functionality
- Properties
- Attached properties
- Value change notification
- Change notifications for property consumers
- Property metadata options
- Events
- Attached events
- Commands
- Properties
- Supporting Templates in Custom Controls
- Property Binding
- Named Parts
- Content Placeholders
- Placeholders Indicated by Properties
- Default Styles
- UserControl
- Adorners
- AdornerDecorator
- Where Are We?
- A. XAML
- XAML Essentials
- Namespaces
- Generating Classes
- Properties
- Children
- Properties
- Property Element Syntax
- Attached Properties
- Attached properties and the property element syntax
- Markup Extensions
- Built-in Markup Extensions
- NullExtension
- TypeExtension
- ArrayExtension
- StaticExtension
- StaticResourceExtension
- DynamicResourceExtension
- ComponentResourceKey
- Binding
- RelativeSource
- TemplateBindingExtension
- Built-in Markup Extensions
- Code Behind
- Code in XAML
- Loading XAML
- Parsing XAML at Runtime
- Loading Compiled XAML (BAML)
- XAML Essentials
- B. Interoperability
- WPF and HWNDs
- Hosting a Windows Form Control in WPF
- Hosting a WPF Control in Windows Forms
- Hosting WPF in Native HWND Apps
- WPF and ActiveX Controls
- WPF and HTML
- Limitations of WPF/HWND Interop
- Airspace
- Transforms, Events, and Nested Interop
- C. Asynchronous and Multithreaded WPF Programming
- The WPF Threading Model
- DispatcherObject
- The Dispatcher
- Obtaining a Dispatcher
- Getting Onto the Right Thread with a Dispatcher
- DispatcherOperation
- DispatcherTimer
- Multiple UI Threads and Dispatchers
- The Event-Based Asynchronous Pattern
- BackgroundWorker
- The WPF Threading Model
- D. WPF Base Types
- DispatcherObject
- DependencyObject
- Visual
- Visual3D
- UIElement
- FrameworkElement
- Decorator
- Panel
- Shape
- Control
- ContentControl
- HeaderedContentControl
- UserControl
- ItemsControl
- HeaderedItemsControl
- Selector
- ContentElement
- FrameworkContentElement
- Freezable
- Animatable
- E. Silverlight
- Why Silverlight?
- What Is Silverlight?
- Hello, Silverlight
- Silverlight XAML
- Layout Model
- Namespaces
- Graphics
- Mouse Cursors
- Measuring Text
- Transformations
- Animations
- Silverlight and WPF
- Development Model
- Hosting in HTML
- End-User Installation
- Handling XAML Errors
- Event Model
- Working with XAML Properties
- The Plug-in
- Working with the XAML Object Model
- An Example: Creating a Button
- Creating Dynamic XAML
- Controlling Media
- Controlling Animations
- Controlling animation execution
- Delaying storyboards
- Mixing Silverlight and HTML
- The Silverlight Downloader
- ASP.NET and Silverlight
- Commingling with ASP.NET
- Dynamic XAML
- XAML and User Controls
- A Taste of Silverlight 1.1
- Tool Support
- Expression Toolset
- Expression Design
- Expression Blend
- Expression Media
- Visual Studio
- Other Tools
- Expression Toolset
- Examples in the World
- Where Are We?
- F. Color Inserts
- Index
- About the Authors
- Colophon
- SPECIAL OFFER: Upgrade this ebook with OReilly