building rich web applications with microsoft silverlight l.
Skip this Video
Loading SlideShow in 5 Seconds..
Building Rich Web Applications with Microsoft SilverLight PowerPoint Presentation
Download Presentation
Building Rich Web Applications with Microsoft SilverLight

Loading in 2 Seconds...

play fullscreen
1 / 27

Building Rich Web Applications with Microsoft SilverLight - PowerPoint PPT Presentation

  • Uploaded on

Building Rich Web Applications with Microsoft SilverLight. Noah Subrin SRA University Spring 2008 Week 3. Today’s Agenda (Week 3). Student Q&AFeedback Week 2 Review Questions Take-home lab review (QuickStart 1) (media, animation, scripting, mouse events)

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

Building Rich Web Applications with Microsoft SilverLight

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
building rich web applications with microsoft silverlight

Building Rich Web Applications with Microsoft SilverLight

Noah Subrin

SRA University

Spring 2008

Week 3

today s agenda week 3
Today’s Agenda (Week 3)
  • Student Q&A\Feedback
  • Week 2 Review Questions
  • Take-home lab review (QuickStart 1)

(media, animation, scripting, mouse events)

  • Chapter 7 – Responding to Input Events
  • More Additional Resources
housekeeping items
Housekeeping Items
  • Toll free audio is available at


Attendee access code: 6259066021

As a courtesy to the class, please mute/unmute your phone by pressing *6 or press the mute key on your phone unless you have something to share with the class

class slides
Class Slides
  • The semesters slides are not yet available on the SRA Portal. You may download them from my blog site or by using Webex File\Transfer function

class feedback
Class Feedback
  • A student hosted some of our html pages with SL 1.0 control and .xaml files on an Apache web server on Windows OS and was able to serve the pages without any problems
  • News yesterday (5/20) Novell just released SilverLight for Linux source code (Moonlight)

student q a feedback
Student Q&A\Feedback
  • Are there any questions or comments anyone would like to share with the class?
  • A student asked about what is the output of a UserControl project in Blend 1.0. The output is a .xaml file and a .csproj file that can be opened in Visual Studio
more student q a
More Student Q&A
  • Difference between VS2008 SL templates (“Web site” vs JS app)

Web site project has the following:

1 – Inline call to CreateObjectEx

2 – Overrides onerror call to fill a DIV tag containing the error info

more student q a8
More Student Q&A
  • Q - How do I get rid of the squiggly lines when I view the .xaml file in Visual Studio
  • A – Check 2 things

1 - Right click the .xaml file in VS. Select Open with. Select xml editor (default) and click the ‘Set as Default’

2 – In Visual Studio Solution Explorer right click the project – choose properties – and select target framework to .Net Framework 2.0

week 2 review questions
Week 2 Review Questions
  • T/F We can create multiple SilverLight instances per web page
  • How do we target a particular version of SilverLight in our code?
  • T/F We need Visual Studio or Blend to create XAML files.
  • Every SL .xaml file contains at least one ____ object.
week 2 review questions continued
Week 2 Review Questions (continued)
  • What 2 properties are used to position a Canvas Object?
  • What property do we use to set the z-order?
  • Name some of the basic Shape objects in SL 1.0
  • How do we create complex shapes that contain curves and arcs?
week 2 review questions continued11
Week 2 Review Questions (continued)
  • Name the 2 parts of most Shape objects?
  • What property do we use to set the alpha or transparency of a UIElement?
  • What property do we use to selectively draw portions of an element?
silverlight 1 0 quickstart review
SilverLight 1.0 QuickStart Review
  • We will proceed with our review of SL 1.0 Quickstart and take a look at media (audio and video), animations, scripting, and mouse events
  • Note the Blend 1.0 Quickstart has additional material about creating event handlers and animations within Blend
demos more 1 0 controls
Demos – More 1.0 Controls
  • Cool Wall
  • NeoGeo SilverLight Zooming Control
  • Page Turner

These controls can be found in the Community Gallery of the web site

chapter 7 responding to input events
Chapter 7 – Responding to Input Events
  • Event handlers p 144 note these two parameters:

sender – instance of the object that raised the event

args – additional info about the event

syntax of adding event handlers
Syntax of Adding Event Handlers
  • Use either of these 2 approaches:

1. In XAML using attribute syntax

2. In JavaScript using element.AddEventListener syntax

We can also remove EventHandlers

book code mouse events
Book Code – Mouse Events
  • Five mouse events supported by UIElements
  • No click event but we use MouseLeftButtonDown
  • OnLoad p 31 three parameters – control,context, rootElement
  • We have to simulate double clicking by checking for multiple events within a give time frame (p151)
book code event bubbling
Book Code – Event Bubbling
  • When an event is raised, it is passed on to its ancestor elements
  • Canvas only raises its own events within the boundaries of its Width and Height
  • Drag and Drop example p156-7
  • Uses UIElement functions CaptureMouse and ReleaseMouseCapture
book code event bubbling19
Book Code – Event Bubbling
  • Building custom scrollbars with JavaScript and XAML
  • P158 Building a Scrollbar
  • Let’s look at the xaml in Blend2
  • Create the 3 child controls using CreateFromXAML method
  • Dynamically add resize and mouse events
silverlight 1 0 stylus support p166
SilverLight 1.0 Stylus Support p166
  • Supports stylus for pen digitizers on Tablet PC using “ink” support
  • MouseEventArgs contains devicetype (Stylus,Mouse, or Touch)
  • Uses InkPresenter UIElement
silverlight 1 0 also supports keyboard events p172
SilverLight 1.0 also supports Keyboard Events p172
  • KeyDown and KeyUp
  • Not all keystrokes are supported by the SilverLight control
  • We can find out what keys are pressed by looking at four properties of the keyEventArgs parameter

Key, PlatformKeyCode, Shift, Control

summary of input events
Summary of Input Events
  • We can capture mouse and keyboard events and create event handlers for them
  • There also is support for styluses
  • Some missing events (such as double click) can be simulated
  • We can do drag and drop and create custom scrollbars using SL 1.0
additional resources
Additional Resources
  • SL 1.0 “How Do I?” Videos
more resources channel 9
More Resources – Channel 9

See Silverlight media, videos, podcasts, screencasts, and photos

optional take home class exercise
Optional Take Home Class Exercise
  • SDK – 1.0 QuickStart

(section on sample controls)

next class session may 29
Next Class Session – May 29
  • Review the optional take home exercise (sample controls)
  • Review Questions
  • Review Chapter 8 from the course text - Downloading Content on Demand
  • Q&A
Questions ?
  • Feel free to contact me at
  • Thank you for your participation!