25
Copyright © 2006 SoftServe, Inc. Silverlight Base Conceptions Taras Romanyk Software Engineer [email protected] http://rredcat.blogspot.com

Silverlight overview

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Silverlight overview

Copyright © 2006 SoftServe, Inc.

SilverlightBase Conceptions

Taras RomanykSoftware Engineer [email protected]://rredcat.blogspot.com

Page 2: Silverlight overview

What is Silverlight?

Microsoft Silverlight is a cross-browser, cross-platform implementation of the .NET

Framework for building and delivering the next generation of media experiences and

rich interactive applications (RIA) for the Web. Silverlight unifies the capabilities of the

server, the Web, and the desktop, of managed code and dynamic languages, of

declarative and traditional programming, and the power of Windows Presentation

Foundation (WPF). (© msdn).

Page 3: Silverlight overview

Compatible Operating Systems and Browsers

Operating System

Windows Internet Explorer 8

Windows Internet Explorer 7

Internet Explorer 6

Firefox 2, 3 Safari 3 Safari 4

Windows Vista + + - + - -Windows 7 + - - + - -Windows Server 2008 + + - + - -Windows Server 2008 R2 + - - - - -Windows XP SP2, SP3 + + + + - -Windows 2000 SP4 + KB 891861

- - Silverlight 2, 3 Only - - -

Windows Server 2003 (excluding IA-64)

+ + + + - -

Mac OS 10.4.8+ (PowerPC) - - - Silverlight

1.0 Only Silverlight 1.0 Only -

Mac OS 10.4.8+ (Intel-based) - - - + + +

Page 4: Silverlight overview

Developer tools

Visual Studio 2008 or Visual Web Developer 2008 Express Edition with Silverlight Tools for Visual Studio 2008

Expression Blend

Silverlight 3 SDK

Silverlight Toolkit

.NET RIA Services

Deep Zoom Composer

Silverlight Dynamic Languages SDK

Page 5: Silverlight overview

Silverlight Architecture

Page 6: Silverlight overview

Integrating Silverlight

The Silverlight Programming Model

Silverlight uses the ActiveX plug-in model for Microsoft Internet Explorer, and

uses the Netscape API plug-in model for other browsers.

Interaction

You can call Silverlight’s method from JavaScript.

You can call JavaScript’s method from Silverlight.

You can load loose XAML.

Silverlight app can be hosted Out-of-Browser or on Alternative Hosting.

Previous versions of the Silverlight SDK included the ASP.NET Controls for Silverlight. These enabled a way for Silverlight applications to be embedded in an ASP.NET Web page that is familiar to ASP.NET developers. The Silverlight 3 SDK does not contain the ASP.NET Server Controls for Silverlight and developers are encouraged to use the HTML or JavaScript embedding techniques described previously to add Silverlight content.

IsolatedStorage – 1MB.

Page 7: Silverlight overview

XAML Usage Syntax

XAML Usage

Content Models

Collections

Markup Extensions

Enumerations

Type Converters

Prefixes and Mappings for Silverlight Libraries

Resources Dictionaries

Page 8: Silverlight overview

Base conceptions for Business Application

Binding

DataContext

ItemsSource

Dependency property

Attach dependency propertyICommand interface

Page 9: Silverlight overview

Binding

Page 10: Silverlight overview

Binding

Path

Sources

Source

ElementName

RelativeSource

Self

TemplatedParent

Converter

ConverterParameter

Mode

OneTime

OneWay

TwoWay

UpdateSourceTrigger

Default

Explicit

Page 11: Silverlight overview

Styling & Templating

Style

ControlTemplate

DataTemplate

Page 12: Silverlight overview

Trigger

EventTrigger

VisualStateManager

Caution! VisualStateManager isn’t trigger! It presents approach for simulation only.

Page 13: Silverlight overview

Transforms

RotateTransform

ScaleTransform

SkewTransform

TranslateTransform

MatrixTransform

TransformGroup

Page 14: Silverlight overview

Animation Overview

You can creating an Animation in Procedural Code or XAML

Double, Color, or Point can be animated. Use ObjectAnimationUsingKeyFrames for properties of other types

You can Start, Stop, Pause, and Resume an Animation

Controlling the Begin Time of Animations

Animation Types

Applying an Animation to a Property

Animating Transforms

What Happens After an Animation Ends

Easing Functions

Custom Animations

Page 15: Silverlight overview

Full Screen Support & Browser Zoom Setting

Full Screen Support A Silverlight plug-in doesn’t display any HTML

content in full-screen mode.

A Silverlight plug-in can enable full-screen mode only in response to a user-initiated action.

A Silverlight plug-in briefly displays the message "Press ESC to exit full-screen mode".

If a Web page hosts multiple Silverlight plug-ins, only one plug-in can be in full-screen mode at one time.

UP ARROW, DOWN ARROW, LEFT ARROW, RIGHT ARROW, SPACEBAR, TAB, PAGE UP, PAGE DOWN, HOME, END, ENTER

A Silverlight plug-in does not support OpenFileDialog and SaveFileDialog in full-screen mode.

Multitouch input is not supported in full-screen mode.

Zoom The browser zoom setting can affect any code

that depends on precise sizing or placement of the plug-in within the host Web page. Different browsers respond to zoom settings in different ways. The operating system dots per inch (DPI) display setting can also affect the zoom setting. If your application uses custom sizing logic, be sure to test it on different browsers and with high DPI settings.

You can disable this feature or replace it by handling the Zoomed event.

The Zoomed event does not have specialized event data (for either JavaScript or managed API handling). For managed handling, you can check the value of ZoomFactor, but ZoomFactor is not available for JavaScript handling.

Zoom is not relevant for full-screen or out-of-browser.

Page 16: Silverlight overview

Deep Zoom

Deep Zoom provides the ability to interactively view high-resolution images. You can zoom in and out of images rapidly without affecting the performance of your application. Deep Zoom enables smooth loading and panning by serving up multi-resolution images and using spring animations.

Exploration of Very Large or High Resolution Images: A classic example of this would be zooming in on parts of a large map to see different levels of detail and then, using the mouse, moving your view around the map surface.

3-D Photography: Take pictures of a room, one after the other, creating a collection of photos that make up a 360 degree picture of the room. Now the user can pan around the room with each photo blending into the other.

Advertisements: You could create a relatively low-resolution image to represent the overall theme of the ad, and then have progressively higher resolution images containing more impressions and data about the product. When the page the ad is embedded in first loads, the ad smoothly sharpens and draws the attention of the reader by loading subsequently higher resolution images. Since the ad progressively loads, it does not significantly impact the user's overall experience of the site. In addition, if the user's mouse enters the ad, different parts of the ad can zoom in.

Page 17: Silverlight overview

Deep Zoom: How it works

Page 18: Silverlight overview

3D

PlaneProjection

Matrix3DProjection

Matrix3D

Projection

Page 19: Silverlight overview

Networking and Communication

WCF

Web Service

Socket

WebClient

HttpWebRequest

HttpWebResponse

Cookies

Page 20: Silverlight overview

MVVM: Model-View-ViewModel Pattern

Page 21: Silverlight overview

User & Custom controls

User Control

You need a complex user interface that contains common or custom controls.

Custom Control

You need to expand functionality of exist control.

You need a control that doesn’t like to any common controls.

Caution! If you need to change a look of common control using DataTemplate, ControlTemplate & Style approach is enough.

Page 22: Silverlight overview

Custom Control

OnApplyTemplate()

Size MeasureOverride( Size availableSize )

Size ArrangeOverride( Size finalSize )

Page 23: Silverlight overview

Silverlight Toolkit

Components in the Mature/SDK Quality Band

AutoCompleteBox

Calendar

ChildWindow

DataGrid

DataPager

DatePicker

GridSplitter

HeaderedItemsControl

TabControl

TreeView

Components in the Stable Quality Band

DockPanel

Expander

HeaderedContentControl

Label

NumericUpDown

Viewbox

WrapPanel

Page 24: Silverlight overview

Silverlight 4 Beta. What is new?

Accessing Web Camera and Microphone

Printing support

A full set of forms controls with over 60 customizable, styleable components. New controls include RichTextbox with hyperlinks, images and editing and Masked textbox for complex field validation.

WCF RIA Services

Localization enhancements with Bi-Directional text, Right-to-Left support and complex scripts such as Arabic, Hebrew and Thai and 30 new languages.

Enhanced databinding support.

Support for Google’s Chrome browser.

Performance optimizations mean Silverlight 4 applications start quicker and run 200% faster than the equivalent Silverlight 3 application.

Multi-touch support enables a range of gestures and touch interactions to be integrated into user experiences.

Mouse Wheel and Right-Click support.

Page 25: Silverlight overview

Copyright © 2006 SoftServe, Inc.

Questions?

Taras RomanykSoftware Engineer [email protected]://rredcat.blogspot.com