jQuery UI 1.6: The User Interface Library for jQuery



Price: $37.98


jQuery UI 1.6: The User Interface Library for jQuery (Packt Publishing) - February 2009Publisher: Packt Publishing - February 03, 2009

ISBN-10: 1847195121, ISBN-13: 9781847195128

Author: Dan Wellman


440 pages




Book Description
Modern web application user interface design requires rapid development and proven results. jQuery UI, a trusted plugin for the jQuery JavaScript library, gives you a trusted platform on which to build rich and engaging interfaces with maximum compatibility, stability, and a minimum of time and effort.

jQuery UI has a series of ready-made, great-looking user interface widgets and a comprehensive set of core interaction helpers designed to be implemented in a consistent and developer-friendly way. With all this, the amount of code that you need to write personally to take a project from conception to completion is drastically reduced This book has been written to maximize your experience with the library by breaking down each component and walking you through examples that progressively build upon your knowledge, taking you from beginner to advanced usage in a series of easy to follow steps.

In this book, you'll learn how each component can be initialized in a basic default implementation and then see how easy it is to customize its appearance and configure its behaviour to tailor it to the requirements of your application. You'll look at the properties and methods exposed by each component's API and see how these can be used to bring out the best in each component.

Events play a key role in any modern web applications if it is to meet the expected minimum requirements of interactivity and responsiveness, and each chapter will show you the custom events fired by each component and how these events can be intercepted and acted upon.

Approach

An example-based approach leads you step-by-step through the implementation and customization of each library component and its associated resources in turn. To emphasize the way that jQuery UI takes the difficulty out of user interface design and implementation, each chapter ends with a `fun with' section that puts together what you've learned throughout the chapter to make a usable and fun page. In these sections you'll often get to experiment with the latest associated technologies like AJAX and JSON.



Table of Contents Summary

About the Authors
Dedications
We Want to Hear from You!
Part I Thinking in WPF

The WPF Design Philosophy

Data and Behavior
Working with Data
Templates
Presenters
Binding and Converters
Layout
Styles
Working with Behaviors
The User Experience
The User Experience Benevolent Circle
A Note on Sample Source Code
Summary

The Diverse Visual Class Structure

Introducing the Visual Classes
The DispatcherObject Class
The DependencyObject Class
The Visual and DrawingVisual Classes
The FrameworkElement Class
The Shape Class
The Text Classes
The Control Class
The ContentControl Class
The ContentPresenter Class
The ItemsControl Class
The UserControl Class
The Panel Class
The Decorator Class
The Adorner Class
The Image Class
The Brushes
The DataTemplate, ControlTemplate, and ItemsPanelTemplate Classes
The Viewport3D Class
The MediaElement Class
The InkCanvas
Summary

Getting Started Writing Custom Controls

Overcoming the “Start from Scratch” Instinct
Using Data Transformations
Find the Behavior You Want, Then Extend
The Power of Attached Properties
Custom Control Creation Checklist
Thinking in Layers–The Art of Decomposition
Sample: Building a Circular Minute Timer
Enhancing and Extending the ProgressBar
Creating the Arc Shape
Working with the ControlTemplate
Summary

Building Custom Panels

Layout Defined
How Layout Works
Working with Visual Children
Creating a Custom Panel: The VanishingPointPanel
Building a Panel with Attached Properties: WeightedPanel
Using Transformations with Layout
Enter the LayoutTransform
Layout Events
Summary

Using Existing Controls

Customizing Existing Controls
Customizing Controls Using Properties
Customization Using Control Templates
Customization with Data Templates
Using a ControlTemplate and a DataTemplate
Customizing the ItemsControl
Customizing a ListBox
Customizing the ItemContainerStyle
Customizing the ItemTemplate and the ItemsPanelTemplate
Creating a Custom ScrollBar
Using Brushes to Create Advanced Visuals
Using the VisualTreeHelper and LogicalTreeHelper
Customization Sample–The Radar Screen
Moving Enemies in a ListBox
Concentric Circles and a Sweeping Cone
Summary

The Power of Attached Properties

Overview of Attached Properties
Building the UseHover Attached Property
Using Attached Properties as Extension Points
Data Templates
Property Abstraction
Layout Animations
Constraining Panels
Application Services
UI Helper Objects
Implementing Drag and Drop with Attached Properties
Summary
Part II Adding Complex Features 

Advanced Scrolling

The Anatomy of a Scrollbar
The Magic of IScrollInfo
Responding to User-Requested Horizontal and Vertical Scrolling
Controlling the Bounds for the Track and Thumb
Managing the Location of the Thumb
Logical Scrolling
Building a Custom Panel with Custom Scrolling
Creating the Layout Logic
Adding the Scrolling Functionality
Animated Scrolling
Taking Scrolling to the Next Step
Scrolling Without IScrollInfo
Summary

Virtualization


Virtualization Distilled
Building Blocks of UI Virtualization
UI Virtualization in WPF
Component Interaction
A Deeper Look at the ItemContainerGenerator
Making Our Own Virtualized Control: The StaggeredPanel
Deferred Scrolling
Container Recycling
Virtualization in 3D
Summary

Creating Advanced Controls and Visual Effects

Lasso Selection Using the InkCanvas
Building a Dock Slide Presenter
Docking and Undocking Controls
Building a Transition Abstraction: The TransitionContainer
Handling Transitions
Applying a Transition
Implementing Popular Visual Effects
Reflection
Drop Shadows
Opacity Masks
Gloss Effects
Summary

Control Skinning and Themes

Introduction to Skins and Themes
Resource Lookups in WPF
Building Default Styles
Using Resources in Default Styles
Creating Theme-Specific Styles
Enabling Runtime Skinning
Using the ApplyTemplate Override
Control Customization Through Property Exposure
Summary
PartIII BuildingInteractivity, 3D, Animations 

Bridging the 2D and 3D Worlds

A Brief Introduction to 3D Worlds
Using the Viewport3D Element
Embedding a Viewport3D Element
Mapping 2D Visuals on 3D Surfaces
Getting Interactive with ModelUIElement3D and
ContainerUIElement3D
2D Bounds of a 3D Object
Hints on Layout in 3D
Interactive 2D-on-3D Surfaces
Summary

Custom Animations

Procedural Animations
Animating Using the DispatcherTimer
Animating Using CompositionTarget.Rendering
Animating with Storyboards
Simple Type-Based Animations (From, To, and By)
Keyframe Animations
Using Storyboards with Parallel Timelines
Using Path-Based Animations
Creating Custom Animations
Creating the 3D Surfaces
Animating Within the DrawingContext
Summary

Pixel Shader Effects

New and Improved Bitmap Effects
Working with Shaders
Setting Up the Environment
An Overview of HLSL
Writing Custom Shaders
Grayscale Shader
Building a Parameterized Shader: TwirlEffect
Animating the Shader Effects
Effect Mapping for GUI Interaction and Eventing
Multi-Input Shaders
A Useful Tool
Summary
Part IV Bringing the Controls to the Real World 

Events, Commands, and Focus

Routed Events
Routed Events, Event Triggers, and Property Mirrors
Attached Events
Class Handlers
Weak Events Using Weak References
Implementing the Weak Event Pattern
Subclassing the Weak Event Manager
Delivering Events Via the IWeakEventListener
Commands
Routed Commands
Commands Versus Events
Request Requery
The ICommandSource Interface
Focus Management
Logical and Keyboard Focus
Focus-Related Events and Properties
Keyboard Navigation
Summary

Advanced Data Binding


Dependency Properties
Dependency Property Precedence
Using AddOwner Instead of Creating a New DependencyProperty
Listening to Property Changed Events on Dependency Properties
Special Data Binding Scenarios
Using RelativeSource.PreviousData
Using NotifyOnSourceUpdated and NotifyOnTargetUpdated
The Dispatcher and DispatcherPriority
Deferring UI Operations
Posting Messages from Worker Threads
The BackgroundWorker Class
Introduction to Continuous LINQ (CLINQ)
Summary

Control and Visual Design Tips

Control Design Tips
Use Internal Resource Dictionaries
Define Complex Controls as Partial Classes
Use Scoped Dependency Properties for Internal State Management
Use Attached Properties for Adding Functionality
Compose Graphics Using Simpler Building Blocks
Communicating Between a Control and Its Subparts
Use a State Machine to Handle Multiple Events and Property Changes
Use Low-Priority Delegates for Noncritical Tasks
Use x: Shared for Cloning Resources
Use Markup Extensions to Encapsulate Object Creation
Useful Patterns for GUI Development
The Strategy Pattern
The Builder Pattern
Model-View-Controller
Model-View-View Model
Factory Method
Composed Method
State Pattern
Code Should be Idiomatic with Regard to“Framework Design Guidelines”
Visual Design Tips
Using Tile Brushes
Using Gradients with Relative Transforms
XAML Coding Conventions
Use the Vista Interface Guidelines
Using Nonstandard Fonts for Icons
Using Transparent PNGs
Import from Photoshop and Illustrator
Opacity Masks
Using Clip Geometries
Some Useful Tools
Snoop
Mole
Kaxaml
Summary

Performance


Different Kinds of Performance
Choice of Visuals
Brushes and Caching
Resource Management
Reference Handling
Data Binding and Freezables
Background Threads for Long-Running Operations
Scrolling and Virtualization
Storyboard Animations
Pixel Shaders
Framework Property Metadata Options
RenderCapability–Hardware and Software Rendering
Optimizing the Render Pipeline
3D
Measuring Performance
Visual Profiler
Perforator
Third-Party Tools
Perceived Responsiveness
Summary

Control Automation

The Need for UI Automation
The Automation Object Model
Assemblies and Namespaces
AutomationElement, AutomationPeer, and Control Patterns
Automation Properties
Navigating the Automation Tree
Using the Automation API
Locating Elements in the Automation Tree
Checking for Control Patterns
Looking Up Property Values
Listening to Events
Navigating to the Parent, Child, or Sibling
Performing Operations on Automation Elements
Automation of a Custom Control
Picking a Base Peer Class
Picking Pattern Interfaces, aka the Control Patterns
Building RangeSelectorAutomationPeer
Additional Resources
Summary
Index