Foundation Expression Blend 4 with Silverlight

Book description

Foundation Expression Blend 4 with Silverlight takes you through your first steps in creating Rich Internet Applications (RIAs) using the latest release of Microsoft's technology. You'll explore features such as custom user controls that you can reuse throughout your projects and the media element that allows you to easily add sound and video to your applications. Silverlight 4 enables you to rapidly develop compelling, cross-platform RIAs using the extensive .NET 4 libraries, the powerful, design friendly Blend 4 Integrated Development Environment, and an enhanced workflow that allows designers and developers to work on the same set of files at the same time. At the end, you'll put everything you have learned together to create a sample Silverlight 4 website.

Whether you're an experienced .NET or web developer, or you're just starting out, this book will provide you with all you need to create RIAs with Expression Blend 4.

  • Develop stunning RIAs in a short time using Blend 4 and Silverlight 4.

  • Learn basic Object Oriented Programming Principles.

  • Get familiar with the Blend 4 development environment.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Cover Image Designer
  4. Acknowledgments
  5. Introduction
    1. Who this Book Is For
    2. What this Book Will Teach You
    3. What Are Silverlight/Blend 4, C#, and XAML?
    4. Using Visual Studio and Blend
    5. What Silverlight Is and How It Differs from WPF
    6. Online Resources
    7. Layout conventions
  6. 1. Setting Up the Silverlight Development Environment
    1. 1.1. Installing Silverlight
    2. 1.2. Downloading and Installing Visual Studio 2010
    3. 1.3. Installing the Silverlight 4 Tools for Visual Studio 2010
    4. 1.4. Installing Expression Blend 4
    5. 1.5. Creating Your Very First Silverlight Application
    6. 1.6. Giving Your First Silverlight 4 Application Some Functionality
    7. 1.7. Summary
  7. 2. The Blend Integrated Development Environment
    1. 2.1. New Features in Blend 4
    2. 2.2. The Blend 4 Toolbar
      1. 2.2.1. The Selection Tool
      2. 2.2.2. The Direct Selection Tool
      3. 2.2.3. The Pen/Pencil Tools
      4. 2.2.4. The Pan Tool
      5. 2.2.5. The Zoom Tool
      6. 2.2.6. The Eyedropper Tool
      7. 2.2.7. The Paint Bucket Tool
      8. 2.2.8. The Brush Transform and Gradient Tools
      9. 2.2.9. The Gradient Tool
      10. 2.2.10. The Brush Transform Tool
      11. 2.2.11. The Shape Tools: Rectangle, Ellipse, and Line
      12. 2.2.12. Layout Controls
      13. 2.2.13. Text Controls and Text Input Controls
      14. 2.2.14. Input Controls
      15. 2.2.15. The Asset Library Last Used tool
      16. 2.2.16. The Asset Library
    3. 2.3. The Objects and Timeline Panel
    4. 2.4. The Project Panel
    5. 2.5. The Properties Panel
      1. 2.5.1. The Brushes bucket
      2. 2.5.2. Creating the Color Resource
      3. 2.5.3. Using the New BlackToWhite Color Resource
      4. 2.5.4. Using OpacityMasks to Create a Reflection Effect
      5. 2.5.5. The Appearance Bucket
      6. 2.5.6. The Layout Bucket
      7. 2.5.7. The Common Properties Bucket
      8. 2.5.8. The Text Bucket
      9. 2.5.9. The Transform Bucket
    6. 2.6. The Miscellaneous Bucket
    7. 2.7. Search
    8. 2.8. The Resources Panel
    9. 2.9. Blend Development Views and Workspaces
      1. 2.9.1. Design View
      2. 2.9.2. XAML View
      3. 2.9.3. Split View
    10. 2.10. Workspaces
      1. 2.10.1. The Design Workspace
      2. 2.10.2. The Animation Workspace
    11. 2.11. Summary
  8. 3. C#, XAML, and Object-Oriented Programming
    1. 3.1. C# and the .NET Framework
      1. 3.1.1. The .NET CLR
      2. 3.1.2. Why C#?
        1. 3.1.2.1. Encapsulation
        2. 3.1.2.2. Classes
        3. 3.1.2.3. Inheritance
        4. 3.1.2.4. Modularity
        5. 3.1.2.5. Maintainability
        6. 3.1.2.6. Automatic Garbage Collection
        7. 3.1.2.7. Language Integrated Query
        8. 3.1.2.8. XML documentation
    2. 3.2. XAML
      1. 3.2.1. A Simple OOP Project
    3. 3.3. Summary
  9. 4. Layout Controls: Including the New Silverlight 4 Controls: Viewbox, RichTextBox, FlowDirection Property, and Improved Data Binding
    1. 4.1. The Grid
    2. 4.2. The Canvas
    3. 4.3. The StackPanel
    4. 4.4. The Border
    5. 4.5. Item Controls
    6. 4.6. Input Controls
    7. 4.7. New Silverlight 4 Controls
      1. 4.7.1. The Viewbox
      2. 4.7.2. The RichTextBox Control
      3. 4.7.3. Flow Direction
      4. 4.7.4. Improved Data Binding
        1. 4.7.4.1. DependencyObject Binding
        2. 4.7.4.2. Data Validation and Data Binding
        3. 4.7.4.3. String Format, TargetNullValue, and FallbackValue
    8. 4.8. Summary
  10. 5. Timed Storyboards: Creating a Newton Cradle Application
    1. 5.1. What Are Storyboards?
      1. 5.1.1. What Are Storyboards?
      2. 5.1.2. Creating a Simple Storyboard
    2. 5.2. Storyboard Animation Types
      1. 5.2.1. Color
      2. 5.2.2. Point
      3. 5.2.3. Double
      4. 5.2.4. Creating the Newton's Cradle Application
      5. 5.2.5. Behaviors
        1. 5.2.5.1. Implementing the ControlStoryboardAction Behavior
    3. 5.3. Summary
  11. 6. Using VSM and Blend 4's State Panel to Create a Silverlight Media Player
    1. 6.1. The Visual State Manager (VSM)
    2. 6.2. Using Blend 4's States Panel
      1. 6.2.1. A Simple Silverlight Project
    3. 6.3. Creating a Media Player Using VSM
      1. 6.3.1. Creating the Silverlight Project in Blend 4
      2. 6.3.2. Designing the Navigation Orb
      3. 6.3.3. Creating the Backplate for the MediaElement
      4. 6.3.4. Adding the MediaElement
      5. 6.3.5. Positioning the Navigation Buttons and the Backplate
      6. 6.3.6. Adding a Reflection
      7. 6.3.7. Adding the States
      8. 6.3.8. Using Behaviors to Trigger the MouseEnter and MouseLeave States
      9. 6.3.9. Adding Easing Functions to Animations to Make Them More Realistic and Fun
      10. 6.3.10. Adding Behaviors to Add the Play, Pause, and Stop Functionality
      11. 6.3.11. Summary
  12. 7. Behaviors in Silverlight
    1. 7.1. What Are Behaviors?
    2. 7.2. Using Behaviors
    3. 7.3. Creating Your Own Simple Behavior
    4. 7.4. Summary
  13. 8. The Silverlight MediaElement: Create a Video Player with a Custom UserControl, XML De-serialization, and Behaviors
    1. 8.1. Choosing Between Silverlight and Flash for Video
      1. 8.1.1. Choosing Silverlight
      2. 8.1.2. Choosing Flash
    2. 8.2. Creating the Silverlight Video Player Application
    3. 8.3. Summary
  14. 9. Events and EventHandlers
    1. 9.1. Creating the EventsAndEventHandlers project
      1. 9.1.1. Creating the EventsAndEventHandlers project
      2. 9.1.2. Click
      3. 9.1.3. Mouse Events
      4. 9.1.4. MouseEnter and MouseLeave
        1. 9.1.4.1. MouseEnter
        2. 9.1.4.2. MouseLeave
      5. 9.1.5. MouseLeftButtonDown
      6. 9.1.6. MouseLeftButtonUp
    2. 9.2. New Events in Silverlight 4
      1. 9.2.1. Right-Click
      2. 9.2.2. MouseWheel
      3. 9.2.3. Drop Target Events
    3. 9.3. Summary
  15. 10. Classes and Interfaces
    1. 10.1. Static Classes vs. Concrete Classes
    2. 10.2. Abstract Classes
    3. 10.3. Sealed Classes
    4. 10.4. Partial Classes
    5. 10.5. Singleton Classes
    6. 10.6. Private vs. Public Access Modifiers (Public and Private Classes)
    7. 10.7. Internal Classes
    8. 10.8. Protected Classes
    9. 10.9. Interfaces
    10. 10.10. Summary
  16. 11. Styles, Control Templates, and Custom UserControls
    1. 11.1. Understanding the ControlTemplate
      1. 11.1.1. Creating a Button ControlTemplate with a Style
    2. 11.2. Creating ResourceDictionaries
      1. 11.2.1. Overriding Default Styles for Controls
      2. 11.2.2. Adding Your Button Style to Your Resource Dictionary
    3. 11.3. Creating Custom UserControls
    4. 11.4. Demystifying the DependencyProperty
    5. 11.5. Summary
  17. 12. Writing a Custom Content Panel
    1. 12.1. Creating the Project
      1. 12.1.1. Summary
  18. 13. Writing a Silverlight 4 Out-Of-Browser Application with Elevated Trust and the New Silverlight 4 COM API
    1. 13.1. Creating an Out-Of-Browser Silverlight 4 Application
    2. 13.2. Summary
  19. 14. Creating a Photobooth Application with the Silverlight 4 Webcam API
    1. 14.1. Creating the Application
      1. 14.1.1. Setting Up the Visuals in Expression Blend
      2. 14.1.2. Using the MouseDragElementBehavior to make items draggable
      3. 14.1.3. Adding the Buttons
      4. 14.1.4. Starting and Displaying the Webcam
      5. 14.1.5. Taking the Snapshot
      6. 14.1.6. Saving the Image
      7. 14.1.7. Adding the Draggable Items to the Saved Image
    2. 14.2. Summary
  20. 15. MVVM: Model-View-ViewModel
    1. 15.1. Overview
      1. 15.1.1. History of MVVM
      2. 15.1.2. Data Binding, DataTemplates, and Commanding
      3. 15.1.3. Model
      4. 15.1.4. View
      5. 15.1.5. ViewModel
    2. 15.2. MVVM Features in Silverlight 4
    3. 15.3. Creating Your First MVVM Application in Blend 4
      1. 15.3.1. Overview of the MVVM Template Project
        1. 15.3.1.1. Creating Supporting Objects
        2. 15.3.1.2. Setting Up the ViewModel
        3. 15.3.1.3. Setting Up the Sample Data Source
        4. 15.3.1.4. Setting Up the View
      2. 15.3.2. MVVM Toolkits and Frameworks for Silverlight
    4. 15.4. Summary
  21. 16. SketchFlow Prototyping
    1. 16.1. Create the Project
    2. 16.2. Setting Up the SketchFlow Structure
    3. 16.3. Adding the Visuals
    4. 16.4. Creating a Navigation Component Screen
    5. 16.5. Connecting to the Nav Component Screen
    6. 16.6. Adding Some Interaction to the Pages
    7. 16.7. Adding the Visual State Group
    8. 16.8. Hooking the Visual States Up
    9. 16.9. The SketchFlow Player and Feedback
    10. 16.10. Word Documentation
    11. 16.11. Summary
  22. 17. New Features of Silverlight 4
    1. 17.1. Right-click and Mouse Wheel Support
    2. 17.2. The Printing API
    3. 17.3. ICommand Support
    4. 17.4. Addition of the RichTextArea Control
    5. 17.5. Clipboard API
    6. 17.6. Network Authentication
    7. 17.7. Improved Data Binding
    8. 17.8. Addition of ViewBox
    9. 17.9. Keyboard Access in Full-screen Mode
    10. 17.10. Google Chrome Support
    11. 17.11. Right-to-Left Support
    12. 17.12. Managed Extensibility Framework (MEF)
    13. 17.13. Offline Digital Rights Management (DRM)
    14. 17.14. Fluid UI Support in Items Controls
    15. 17.15. Cross-Domain Networking Made Easier
    16. 17.16. TextTrimming
    17. 17.17. Summary

Product information

  • Title: Foundation Expression Blend 4 with Silverlight
  • Author(s):
  • Release date: August 2010
  • Publisher(s): friends of ED
  • ISBN: 9781430229735