Introduction to Silverlight

Slides:



Advertisements
Similar presentations
Panels, Tab Containers Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer
Advertisements

Introduction to Windows Presentation Foundation (WPF) Dr. Frank McCown COMP 445 – GUI Programming.
Dinko Jakovljević Microsoft Student Partner | BambooLab
An Introduction To Silverlight Gergely Orosz
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Computer science Languages, etc.. Overview For web-applications (HTML, JS) – Designing languages (HMTL, CSS) – Server Languages (PHP, ASP) – Extensions.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 16: Java Applets & AWT Fundamentals of Web Programming.
.Net is a collection of libraries, templates and services designed to make programming applications of all kinds, easier, more flexible (multi platform),
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.
1 COS240 O-O Languages AUBG, COS dept Lecture 33 Building Apps Technologies C# (WPF part 1)
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
WPF chapter 15 Dr. John Abraham Professor UTPA. WPF –an introduction WPF provides a single platform capable of handling graphics, audio and video. WPF.
1 Intro XAML Attribute syntax & property syntax Panels Reusable resources Controls Data binding Steen Jensen, spring 2014.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Windows Presentation Foundation. Agenda Introduction Developing Applications WPF and WF interoperability Custom Controls Styles and Templates Data Binding.
Silverlight Hitesh Trivedi Computer Science B.Tech A-Sec J.I.E.T.
ASP.NET Web Server Controls Basic Web Server Controls.
ASP.NET Controls. Slide 2 Lecture Overview Identify the types of controls supported by ASP.NET and the differences between them.
C# Events and WPF #W5. Horizontal Prototype WPF Designed for rapid user interface design Used for many devices: Windows Phone, Tablets, PCs,
Windows Presentation Foundation Adam Calderon Principal Engineer Interknowlogy LLC
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
LAYOUT CONTROLS. XAML Overview XAML : eXtensible Application Markup Language pronounced (ZAMEL) is a markup language used to design user interfaces XML-based.
Tutorial 5 Working with Tables and Columns
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Windows Presentation Foundation (WPF). Introduction Separates appearance of user interface from behavior Appearance usually specified by XAML Behavior.
Introducing Silverlight 2. Agenda Silverlight architecture XAML CoreCLR The Silverlight Base Class Library Silverlight security Your first Silverlight.
Module 4 Taking Control of the User Interface. Module Overview Sharing Logical Resources in an Application Creating Consistent User Interfaces by Using.
.NET Framework Presentation. About Me Patrik Löwendahl –C# MVP –Certified Vista Touchdown Trainer Cornerstone
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Eben de Wit Developer Advisor Microsoft
An Introduction to Developing Applications for Microsoft Silverlight Jaime Rodriguez
Positioning Objects with CSS and Tables
Module 1 Introducing C# and the.NET Framework. Module Overview Introduction to the.NET Framework 4 Creating Projects Within Visual Studio 2010 Writing.
GETTING STARTED WITH VISUAL STUDIO.NET Getting Around Visual Studio.NET Using Panes Getting Panes back to normal The View Menu Online Resources Compatibility.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Windows Presentation Foundation Ruwan Wijesinghe.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
Part of the Microsoft.NET Framework 3.0 Tomer Shamam.NET Technologies Expert Sela Group
Introduction to Silverlight Development Pavel Yosifovich CTO, Matrix Global; Senior Instructor, Hi-Tech College
Jim Fawcett CSE686 – Internet Programming Spring 2014
Working with Cascading Style Sheets
Introduction to Windows Programming
ASP.NET Forms.
Windows Presentation Foundation
ASP.NET Web Controls.
Jim Fawcett CSE686 – Internet Programming Spring 2012
IS 360 Declaring CSS Styles
Application with Cross-Platform GUI
Introduction to Silverlight
Active Server Pages ASP.Net
Jim Fawcett CSE775 – Distributed Objects Spring 2011
Jim Fawcett CSE686 – Internet Programming Summer 2008
Introduction to Silverlight
Introduction to Internet Programming
Objectives Create a reset style sheet Explore page layout designs
Layouts AKEEL AHMED.
Web Development in Microsoft Visual Studio 2013
WPF AKEEL AHMED.
.NET and .NET Core 7. XAML Pan Wuming 2017.
Windows Presentation Foundation
Chapter 2 – Introduction to the Visual Studio .NET IDE
Tutorial 6 Creating Dynamic Pages
Static and Dynamic Web Pages
ASP.NET.
Web Development Using ASP .NET
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
Presentation transcript:

Introduction to Silverlight Jim Fawcett CSE686 – Internet Programming Summer 2011 Introduction to Silverlight

References Silverlight Get Started Quickstarts Whitepapers MSDN Documentation Silverlight tutorials from wynapse Interacting with HTML DOM and Javascript

What is Silverlight? A system for drawing on web pages. It has: A plug-in for Internet Explorer and the other most used browsers. Hosts a slim CLR running code using a subset of the Framework Class Libraries A control that sits on a web page (html or aspx). Functionality provided by Xaml markup and code behind, using an event model similar to Javascript Code-behind runs on the browser, not the server, in the plug-in’s slim CLR.

Drawing on Web Pages? All of the content below is drawn with vector graphics.

Xaml? <Border CornerRadius="10" Width="365" Canvas.Top="50" Canvas.Left="250"> <Border.Background> <RadialGradientBrush GradientOrigin="0.25,0.5" Center="0.5,0.5“ RadiusX="0.85" RadiusY="0.85"> <GradientStop Color="#FF5C7590“ Offset="1" /> <GradientStop Color="White" Offset="0" /> </RadialGradientBrush> </Border.Background> <TextBlock Text="CSE686 - Internet Programming“ Margin="10" FontSize="20" /> </Border>

Code-behind? { if (button1.Content.ToString() == "Click me") private void button1_Click(object sender, RoutedEventArgs e) { if (button1.Content.ToString() == "Click me") button1.Content = "Been clicked"; textBox1.Text = " You've clicked the button.\n Please do that again."; } else button1.Content = "Click me"; textBox1.Text = "";

Silverlight Processing Model Silverlight works much like Javascript Gets loaded with the page (html or aspx). A parse tree that mirrors the Xaml is built and rendered Events, like the button click in the previous slides, are processed by bindings between a silverlight control (the button) and an event handler, button1_click. This works just like Javascript events, with no postback to the server.

Interactions with Asp.Net Basically none! Silverlight code-behind can call Javascript functions provided by the aspx page using HtmlDocument and HtmlPage classes from the System.Web.Browser namespace. Silverlight code-behind can use a server-based web service or WCF. So Silverlight can be: A decoration on a page A control that draws, e.g., a charter An execution engine complementary to, but decoupled from Asp.Net

Using the Toolbox You will find that when you pull controls from the Toolbox: They drop onto the designer surface They drop onto the Xaml display You will probably add controls most often simply by writing the Xaml. Intellisense is a big help for that.

Markup XAML eXtensible Application Markup Language Tags are names of Silverlight classes A subset of the .Net 4.0 Framework Class Libraries. Attributes are class properties and events <Grid> <Ellipse Fill=“blue” /> <TextBlock> Name: <TextBlock Text=“{Binding Name}” /> </TextBlock> </Grid>

Parse Tree XAML gets rendered into a parse tree, just like XML – it is XML Inherited properties are based on parent child relationships in the markup tree Events bubble based on those relationships as well You have direct and simple control over that structure The world is yours!

Panels Layouts, like the previous page can use: Canvas StackPanel Grid Simplest, placement relative to two edges Uses absolute positioning, so takes contents out of flow of page StackPanel Horizontal or vertical stacking Grid Uses rows and columns All of these can be nested, any one in another

Routed Events Silverlight maps markup elements to UIElements, which derive from ContentControl That means that almost everything can hold content, often multiple things. How does a mouse click event on any one of a control’s content elements get routed to the control? By walking the XAML parse tree until it finds a parent that handles that event (Routed Events).

Adding Event Handlers You will find that property sheets show events. But you can also add event handlers quickly: Go to the XAML, type a space after the tag for the element you want to handle the event That gets you a context menu (via intellisense) and you just double click on the desired event, which adds an event attribute

Property Syntax Two syntax forms: XAML attribute: <button ToolTip=“Button Tip /> Property Element Syntax: <Button> <Button.Background> <SolidColorBrush Color=“#FF4444FF” /> </Button.Background> Some Button Text </Button>

Inline Styles Collections of property values: <Button.Style> <Style> <Setter Property=“Button.FontSize” Value=“32pt” /> <Setter Property=“Button.FontWeight” Value=“Bold” /> </Style> </Button.Style>

Summary Silverlight is a useful subset of WPF Silverlight complements Asp.Net Can be served on Asp.Net pages Can not directly communicate with Asp.Net code. Runs on browser in scaled-down CLR. Can communicate with JavaScript Can communicate with WCF hosted on Server