67
Ministry Of Higher Education and Scientific Research University of Technology Computer Engineering & Information Technology Department Design & Implementation Of Dynamic Silverlight A project Submitted to the department of Computer Engineering& Information Technology in partial fulfilment of requirement for the degree of B.Sc By Mustafa Saad Mustafa Samara Emad Nema Supervised by Assistant Lecturer Saif Ghassan Mohammed 2010 1431

Design & Implementation of Dynamic Silverlight.pdf

Embed Size (px)

DESCRIPTION

My B.Sc. Thesis. It is about Silverlight

Citation preview

Page 1: Design & Implementation of Dynamic Silverlight.pdf

Ministry Of Higher Education and Scientific Research University of Technology Computer Engineering & Information Technology Department

Design & Implementation Of Dynamic Silverlight

A project

Submitted to the department of Computer Engineering& Information Technology in partial fulfilment of requirement for the degree of B.Sc

By

Mustafa Saad Mustafa

Samara Emad Nema

Supervised by

Assistant Lecturer Saif Ghassan Mohammed

2010 1431

Page 2: Design & Implementation of Dynamic Silverlight.pdf

بسم الله الرحمن الرحيم

وة فيها مصبـاح ـوت واألرض مثـل نوره كمشك ـ“الله نور السم

المصبـاح في زجاجة الزجاجة كأنها كوكب دري يوقد من

شجرة مبركة زيتونة ال شرقية وال غربية يكاد زيتها يضيء

ولو لم تمسسه نـار نور على نور يهدي الله لنوره من يشاء

ويضرب الله األمثـال للنـاس والله بكل شيء عليم ”

صدق اهللا العظيم

) من سورة النور ٣٥( االيه

Page 3: Design & Implementation of Dynamic Silverlight.pdf

Supervisor Certificate I

Supervisor Certificate

We certify that the preparation of this thesis entitled “Design & Implementation of Dynamic Silverlight” was made under our supervision in the Computer Engineering & Information Technology Department in the University of Technology, as a partial fulfillment of the requirements needed for the award of the B.Sc Degree in Information Technology Engineering.

Signature:

Name: Assistance lecturer Saif Ghassan Mohammed

Date: / /2010

Page 4: Design & Implementation of Dynamic Silverlight.pdf

Examination Committee II

Examination Committee We certify that we have read this project entitled “Design &

Implementation of Dynamic Silverlight” and we have examined the students “Mustafa Saad Mustafa” & “Samara Emad Nema” in their contents as a committee and what is related with it, and found that it is adequate a project for the degree of Bachelor of Computer Engineering and Information Technology.

Signature: Signature:

Name: Name:

Scientific Degree: Scientific Degree:

Date: / / 2010 Date: / / 2010

(Chairman) (Member)

Signature: Signature:

Name: Name:

Scientific Degree: Scientific Degree:

Date: / / 2010 Date: / / 2010

(Member) (Supervisor)

Approved by the University of Technology Undergraduate Studies of Computer Engineering and Information Technology.

Signature:

Name: Dr. Mahmood Al-Shammari

Title: Head of Computer Engineering and Information Technology

Date: / / 2010

Page 5: Design & Implementation of Dynamic Silverlight.pdf

Dedication III

U أالهـــداءالى من سهرت علي الليالي الطوال...

الى التي بحبها ارتقي وادنو قريب الجنان...

الى التي اشعرتني بالسعادة الغالية) (أمي.......................واالمان......................................

الى من اضاء بعرق جبينه شموعا تنير لي درب االيام...

الى من افتخر بحمل اسمه واتشرف باالنتساب اليه...

الى استاذي ومعلمي االول وسبب (أبي الغالي) ........................وجودي.....................................

الى من كان لي فرحا وسرورا...

(أخوتي) .........واضاء طريقي ضياءا ونورا...................................

(أساتذتي) ب المسقبل................در الى المصابيح التي انارت لنا

الى القلوب التي جعلت للصداقة معى مشرقا...

...............(أصدقائي) ......يتحدى كل السنين...........................

Page 6: Design & Implementation of Dynamic Silverlight.pdf

Acknowledgment IV

Acknowledgment

We present our thanks to all the people who were there for us during preparing this thesis

Many thanks for our supervisor the Assistance Lecturer Mr. Saif Ghassan for his continuous support and encouragement, he was always there to listen and advice.

Thanks to Dr. Mahmood Al-Shammari, Head of Computer Engineering and Information Technology department who provided a suitable environment in the department which was a great help for us to fulfil this project

Thanks for the teaching staff of the department, for our colleagues, and all friends who gave useful notes and advices.

And thanks to our families for their support.

Page 7: Design & Implementation of Dynamic Silverlight.pdf

Abstract V

UAbstract The idea of this thesis is to design a site using ASP.NET language,

with a silverlight object in it, and then passing parameters to the object from the server's side. This means that we have implemented dynamics in Silverlight.

This is an advantage over the flash technique which is not compatible with ASP.NET, because the flash uses Action Script language and flex environment. This means that Silverlight has this feature over the flash technique.

We have showed the dynamics of Silverlight through a simulation of Airlines movement data show for the Iraqi airports.

This simulation shows the control on Airlines movement within Iraqi airports, with viewing some of the data related to the trip (like distance and time).

The above said means that we can enable the parameters to pass from the server-side to the client-side. Passing the parameters from the server-side to the client-side was difficult in Flash technique which is use in ASP.NET.

Page 8: Design & Implementation of Dynamic Silverlight.pdf

Abbreviations VI

ADO:

List of Abbreviations

ActiveX Data Objects.

AJAX: asynchronous JavaScript and XML.

ASP: Active Server Page.

CGI: Common Gateway Interface.

CLR: Common Language Runtime.

HTML: HyperText Markup Language.

HTTP: HyperText Transfer Protocol.

IIS: Internet Information Server.

Jscript: Java script.

LINQ: Language-Integrated Query.

RIA: Rich Internet Application.

WCF: Windows Communication Foundation.

WPF: Windows Presentation Foundation.

WWW: World Wide Web.

XAML: eXtensible Application Markup Language.

Page 9: Design & Implementation of Dynamic Silverlight.pdf

Contents VII

Contents

Supervisor Certificate- - - - - - - - - - - - - - - - - - - - - - - - - - - - - I Examination Committee - - - - - - - - - - - - - - - - - - - - - - - - - - - II Dedication - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - III Acknowledgment- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IV Abstract - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - V Abbreviation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VI Contents- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VII

1.1

Chapter One: Introduction

Introduction- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 1.2 Aim of the Project- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 1.3 Project Requirements- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 1.4 Related Project- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4

2.1

Chapter Two: Silverlight Theory

Web Documents- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 2.1.1 Static Documents - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 2.1.2 Dynamic Documents- - - - - - - - - - - - - - - - - - - - - - - - - - 6 2.1.3 Active Documents - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 2.2 ASP- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 2.2.1 ASP.NE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 2.3 Server-Side Programming - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 2.4 Client-Side Programming - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 2.5 IIS (Internet Information Services) - - - - - - - - - - - - - - - - - - - - - 11 2.6 Silverlight- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 2.6.1 Browser and Operating System Support for Silverlight- - - 14 2.6.2 Silverlight vs. Flash - - - - - - - - - - - - - - - - - - - - - - - - - - 15 2.6.3 Feature of Silverlight- - - - - - - - - - - - - - - - - - - - - - - - - - 16 2.6.4 Advantage and Disadvantage of Silverlight- - - - - - - - - - - 17 2.6.5 Silverlight 4 Beta - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18 2.6.6 New Features in Silverlight 4 Beta - - - - - - - - - - - - - - - - 18 2.7 XAML- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19

Page 10: Design & Implementation of Dynamic Silverlight.pdf

Contents VIII

3.1

Chapter Three: Design & Implementation

Master Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 21 3.2 Direction Map page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 23 3.3 Airports Sites page- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 26 3.4 Flight Schedule page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 27 3.5 Contact Us page- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 28

4.1

Chapter Four: Conclusion & Future works

Conclusion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30 4.2 Future works- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 31 References -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 32

Page 11: Design & Implementation of Dynamic Silverlight.pdf

Chapter One Introduction

Page 12: Design & Implementation of Dynamic Silverlight.pdf

2 Chapter One: Introduction

1.1 Introduction

Announced at the Mix ’07 conference in May of 2007, Silverlight took the world by storm with a vision of Adobe Flash–like Rich Internet Applications (RIAs) built using a standards-based, open approach with HTML and XAML using tools like Visual Studio .NET and the new Microsoft Expression Blend.

The idea for Silverlight is nothing new; Microsoft had been talking about a technology called WPF/e for the previous 8 or 10 months. Interestingly enough, there was so much confusion around what WPF/e meant, the name needed to change to something completely different, a name that did not associate WPF/e with the smart client, next-generation UI platform Windows Presentation Foundation (WPF). The idea was to tack the letter “e” on the end of WPF to convey Windows Presentation Foundation Everywhere. But this was simply not the case. This WPF is a core part of .NET 3.0 and has a 30MB runtime that requires a Windows-based desktop to run.

WPF/e was a 2MB download, ran in the browser, and ran on multiple platforms. And multiple platforms here does not mean Windows XP and Windows Vista; it means Windows and Apple Macintosh. It means the Safari web browser on an Apple Macintosh being served up from an Apache web server running on Linux. Yes, you read that correctly, Linux, Mac, Safari, and Windows, too. There are other significant differences as well, Needless to say, the name WPF/e was not going to adequately represent this amazing new technology, so Silverlight was announced as the new name at Mix ’07.

1.2 Aim of the Project

The aim of the project is to present the dynamics of Silverlight by passing parameter from server-side (ASP.NET) to client-side (Silverlight object).

Page 13: Design & Implementation of Dynamic Silverlight.pdf

3 Chapter One: Introduction 1.3 Project Requirements

In this project three programs are used. Each one need certain requires:- First program: Visual Studio 2010 beta2. Requires: Supported Operating Systems:

• Windows XP (x86) with Service Pack 3 - all editions except Starter Edition.

• Windows Vista (x86 & x64) with Service Pack 2 - all editions except Starter Edition.

• Windows 7 (x86 and x64). • Windows Server 2003 (x86 & x64) with Service Pack 2 - all

editions. • Windows Server 2003 R2 (x86 and x64) - all editions. • Windows Server 2008 (x86 and x64) with Service Pack 2 - all

editions. • Windows Server 2008 R2 (x64) - all editions.

Supported Architectures: • 32-Bit (x86). • 64-Bit (x64).

Hardware Requirements: • Computer with a 1.6GHz or faster processor. • 1024 MB RAM (1.5 GB if running in a virtual machine). • 3 GB of available hard-disk space. • 5400 RPM hard drive. • DirectX 9 capable video card running at 1024 x 768 or higher-

resolution display. • DVD-ROM Drive.

Second program: Microsoft Expression Blend 3.Requires: Supported Operating Systems: Windows 7; Windows Vista;

Windows XP Service Pack 2. Hardware Requirements:

• PC with 1 GHz or faster processor . • 512 MB of RAM or more. • 350 MB of available hard-disk space. • .NET Framework 3.5 with Service Pack 1. • Support for Microsoft DirectX® 9.0 graphics with Windows

Vista Display Driver Model (WDDM) Driver, 128 MB of graphics RAM or more, Pixel Shader 2.0 in hardware, 32-bits per pixel .

• DVD compatible drive . • 1024 x 768 or higher-resolution monitor with 24-bit color.

Page 14: Design & Implementation of Dynamic Silverlight.pdf

4 Chapter One: Introduction

• Actual requirements and product functionality may vary based on your system configuration and operating system.

Third program: Silverlight Tool 4.0 for Visual Studio 2010 beta2. Requires:

Supported Operating Systems: Windows 7; Windows Vista; Windows XP Service Pack 3.

• Windows 7. • Windows Vista Service Pack 2. • Windows XP Service Pack 3.

Visual Studio Requirements: • Microsoft Visual Studio 2010 RC with the Visual Web

Developer feature. • Microsoft Visual Web Developer 2010 Express RC.

1.4 Related Project

The Silverlight Airlines project invented by Microsoft that shows the Airlines movement schedule is somehow related to this project.

The key difference between the two is that this project concentrates on the dynamic of Silverlight, while Microsoft's project deals with statics Silverlight. [1]

Page 15: Design & Implementation of Dynamic Silverlight.pdf

Chapter Two

Silverlight Theory

Page 16: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 6

2.1 Web Documents

The documents in the WWW (World Wide Web) can be grouped into three broad categories: static, dynamic, and active. The category is based on the time at which the contents of the document are determined.

2.1.1 Static Documents

Static documents are fixed-content documents that are created and stored in a server. The client can get only a copy of the document. In other words, the contents of the file are determined when the file is created, not when it is used. Of course, the contents in the server can be changed, but the user cannot change them. When a client accesses the document, a copy of the document is sent. The user can then use a browsing program to display the document (as shown in Figure 2-1).

Figure 2-1 Static document

2.1.2 Dynamic Documents

A dynamic document is created by a Web server whenever a browser requests the document. When a request arrives, the Web server runs an application program or a script that creates the dynamic document. The server returns the output of the program or script as a response to the browser that requested the document. Because a fresh document is created for each request, the contents of a dynamic document can vary from one

Page 17: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 7 request to another. A very simple example of a dynamic document is the retrieval of the time and date from a server. Time and date are kinds of information that are dynamic in that they change from moment to moment. The client can ask the server to run a program such as the date program in UNIX and send the result of the program to the client.

2.1.3 Active Documents

For many applications, we need a program or a script to be run at the client site. These are called active documents. For example, a program that creates animated graphics on the screen or a program that interacts with the user. The program definitely needs to be run at the client site where the animation or interaction takes place. When a browser requests an active document, the server sends a copy of the document or a script. The document is then run at the client (browser) site. [2]

2.2 ASP

The original ASP (Active Server Page) platform garnered a huge audience of nearly one million developers, becoming far more popular than even Microsoft anticipated. It wasn’t long before it was being wedged into all sorts of unusual places, including mission-critical business applications and highly trafficked e-commerce sites. Because ASP wasn’t designed with these uses in mind, performance, security, and configuration problems soon appeared. [3]

2.2.1 ASP.NET

ASP.NET was developed as an industrial strength web application framework that could address the limitations of ASP. Compared to classic ASP, ASP.NET offers better performance, better design tools, and a rich set of ready-made features.

ASP.NET is part of the .NET framework; it is available on any server with the framework installed. In other words, it's not an add-on anymore; ASP has become legitimate. ASP.NET is implemented in an assembly that exposes classes and objects that perform predetermined specific tasks. ASP.NET programs are centralized applications hosted on one or more Web servers that respond dynamically to client requests. The responses are dynamic because ASP.NET intercepts requests for pages with specific extensions, for example .aspx or .ascx, and hands off the

Page 18: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 8 responsibility for answering those requests to JIT (just-in-time) compiled code files that can build a response on-the-fly.

ASP.NET supports all the .NET languages (currently C#, C++, VB.NET, and Jscript (Java script), but there are well over 20 different languages in various stages of development or deployment for .NET), so the designer will eventually be able to write Web applications in his choice of almost any modern programming language. Microsoft was able to draw on millions of hours of developer experience with classic ASP, so in addition to huge increases in speed and power, ASP.NET provides substantial development improvements, such as seamless server-to-client debugging, automatic validation of form data, and a programming model very similar to that of a Windows application. [4]

ASP.NET works with IIS (Internet Information Server) to deliver content in response to HTTP (HyperText Transfer Protocol) requests. ASP.NET pages are found in .aspx files; Figure 2-2 illustrates the technology’s basic architecture.

Figure 2-2 ASP architecture

Page 19: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 9

During ASP.NET processing the designer has access to all .NET classes, custom components created in C# or other languages, databases, and so on. In fact, the designer has as much power as he would has running a C# application; using C# in ASP.NET is in effect running a C# application.

An ASP.NET file can contain any of the following:

Processing instructions for the server. Code in C#, Visual Basic .NET, JScript .NET, or any other language

that the .NET Framework supports. Content in whatever form is appropriate for the generated resource,

such as HTML. Client-side script code. Embedded ASP.NET server controls. [5]

2.3 Server-Side Programming

To understand why ASP.NET was created, it helps to understand the problems of early web development technologies. With the original CGI (Common Gateway Interface) standard, for example, the web server must launch a completely separate instance of the application for each web request. If the website is popular, the web server struggles under the weight of hundreds of separate copies of the application, eventually becoming a victim of its own success. Furthermore, technologies such as CGI provide a bare-bones programming environment. If the designer wants higher-level features, like the ability to authenticate users, store personalized information, or display records he has retrieved from a database, he need to write pages of code from scratch. Building a web application this way is tedious and error-prone.

To counter these problems, Microsoft created higher-level development platforms, such as ASP and ASP.NET. Both of these technologies allow developers to program dynamic web pages without worrying about the low-level implementation details. For that reason, both platforms have been incredibly successful. [3]

Page 20: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 10 2.4 Client-Side Programming

At the same time that server-side web development was moving through an alphabet soup of technologies, a new type of programming was gaining popularity. Developers began to experiment with the different ways they could enhance web pages by embedding miniature applets built with JavaScript, ActiveX, Java, and Flash into web pages. These client-side technologies don’t involve any server processing. Instead, the complete application is downloaded to the client browser, which executes it locally.

The greatest problem with client-side technologies is that they aren’t supported equally by all browsers and operating systems. One of the reasons that web development is so popular in the first place is because web applications don’t require setup CDs, downloads, and other tedious (and error-prone) deployment steps. Instead, a web application can be used on any computer that has Internet access. But when developers use client-side technologies, they encounter a few familiar headaches. Suddenly, cross-browser compatibility becomes a problem.

Developers are forced to test their websites with different operating systems and browsers, and they might even need to distribute browser updates to their clients. In other words, the client-side model sacrifices some of the most important benefits of web development. For that reason, ASP.NET is designed as a server-side technology. All ASP.NET code executes on the server. When the code is finished executing, the user receives an ordinary HTML page, which can be viewed in any browser. Figure 2-3 showing the difference between the server-side and the client-side model. [3]

Page 21: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 11

Figure 2-3 Server-side and client-side web applications

2.5 IIS (Internet Information Services)

Internet Information Services (IIS) is Microsoft’s premier Web server product that comes free with the latest versions of Windows. As a platform, IIS delivers Web pages and Web services as requested by a browser or other application. ASP.NET 3.5 meshes seamlessly with IIS to produce the dynamic pages that the user can run IIS on his developer workstation, over his company’s intranet, or expose it to the vast public on the Internet. However, unless the user are running a large business on the Internet, he probably use IIS through an independent hosting company. These hosters are specialists who rent space on their servers, sell band-width, maintain connections to the Internet, and Schedule backups. [6]

IIS is a Windows service that is responsible for processing requests received on specific ports. For this purpose, a service called the World Wide Web Publishing Service runs on the system.

This service listens on a couple of TCP/IP (Transmission Control Protocol/Internet Protocol) network ports, usually port 80 for normal HTTP (Hypertext Transfer Protocol) and port 443 for HTTPS (Hypertext Transfer Protocol Secure). The service is managed by the IIS management console (also referred to as IIS Manager), where the designer can create multiple websites. For every website, he can register multiple ports, and at least one is necessary. A default installation consists of one default website running on port 80.

Page 22: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 12

Any incoming request on one of the registered ports for the configured websites is passed through the Windows network stack to IIS (actually the World Wide Web Publishing Service), which processes the request and returns a response to the client again through the Windows network stack.

There is many version of IIS that has been released ,IIS5.x, IIS6.0, and IIS7. [7]

2.6 Silverlight

Silverlight is a cross-browser, cross-platform and cross-device browser plug-in that helps companies design, develop and deliver applications and experiences on the Web. A free download that installs in seconds, Silverlight enables a new class of rich, secure and scalable cross-platform experiences. [8]

Silverlight is simply a web-based platform for building and running RIAs (rich internet applications). The web-based platform part of that equation is essentially the plug-in that runs inside the web browser. Silverlight applications execute within a browser plug-in that installs onto the local machine via the web browser in the exact same manner the user install Adobe Flash to run Flash-based animations on web pages. The Silverlight plug-in supports the entire factor that the user had expected from an RIA, such as vector based graphics and animations, full video integration, and even high-definition video.

You can boil down the coolness of Silverlight to the following bullets:

It’s a cross-platform, cross-browser platform for delivering RIAs.

It supports playback of Windows Media video and audio files on PC and Mac with no dependency on Windows Media Player.

Using XAML, HTML, and JavaScript, it delivers rich multimedia, vector graphics, animations, and interactivity beyond what AJAX can deliver.

The installation package is less than 4MB. The same XAML created for Silverlight can be used in WPF

applications with no changes.

The Silverlight player (or plug-in, or control) itself is a completely standalone environment; there is no dependency on the .NET Framework

Page 23: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 13 on the client, on the .NET Framework on the server, or even on a specific version of the .NET Framework. The initial association to the .NET Framework comes from the fact that the designers are using XAML (eXtensible Application Markup Language) to build the user interface for Silverlight applications, which is of course the foundation of the rich WPF applications built on .NET 3.0. The XAML is downloaded to the browser and executes within the Silverlight runtime on the client. When the XAML is running in the Silverlight player in the web browser, The user can access all of the Silverlight objects via JavaScript code that lives in his HTML page.

Figure 2-4 Silverlight overviews

The above Figure 2-4 demonstrates this interaction between the web browser, the Silverlight player, the XAML, and the HTML page.

The big picture of Silverlight from an architectural perspective is in Figure 2-5.

The important thing to note now is that in using JavaScript the user has access to the entire document object model (DOM) of the HTML page that Silverlight is running, which includes Silverlight objects themselves.[9]

Page 24: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 14

Figure 2-5 Architectural perspective of Siverlight

2.6.1 Browser and Operating System Support for Silverlight

When the Silverlight runtime is installed, a browser plug-in that exposes the Silverlight control is installed. Based on the platform, the control is packaged differently. On Windows, Internet Explorer uses an ActiveX, COM-based model to host Silverlight controls in all other combinations of browsers and platforms the Netscape plug-in technology is used to host Silverlight controls.

Silverlight is fully supported across multiple browsers and operating systems. The current status for browser and OS support is:

Internet Explorer 6 and 7 (Windows). Firefox 1.5.0.8, 2.0+ (Windows and Mac, with.

Linux support announced). Safari 2.0.4+ (Mac). Konqueror, WebKit, and Opera are being looked at by the Mono

team and Novell. Windows XP SP2. Windows Vista. Mac OS X (10.4.8+). Moonlight, a Linux-based version of Silverlight, is being created by

the Mono team at Novell. BSD and Solaris are being discussed for future support, but are not currently available. [9]

Page 25: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 15

Several other technologies use a plug-in to stretch the bounds of the browser, including Java, ActiveX, Shockwave, and (most successfully) Adobe Flash. Although all these alternatives are still in use, none of them has become the dominant platform for rich web development. Many of them suffer from a number of problems, including installation headaches, poor development tools, and insufficient compatibility with the full range of browsers and operating systems. The only technology that’s been able to avoid these pitfalls is Flash, which boasts excellent cross-platform support and widespread adoption. However, Flash has only recently evolved from a spunky multimedia player into a set of dynamic programming tools. It still offers far less than a modern programming environment like .NET. That’s where Silverlight fits into the picture. Silverlight aims to combine the raw power and cross-platform support of Flash with a first-class programming platform that incorporates the fundamental concepts of .NET. [8]

2.6.2 Silverlight vs. Flash

Some people refer to Microsoft’s Silverlight technology as a “Flash killer”. However, the similarities are striking. Both Adobe Flash (formerly Macromedia Flash) and Silverlight come as browser plug-ins. Both support vector graphics, audio and video playback, animations, and scripting support.

The technology basis is different. Flash uses a semi-open binary format, Silverlight is based on WPF. Before it was called Silverlight, the technology was codenamed WPF/E (Windows Presentation Foundation Everywhere). And thanks to good browser support, Silverlight can really be run everywhere, at least in theory. [10]

The Adobe Flash technique is used for browser plug-in over 90 percent of the world’s web browsers. Flash has a long history that spans more than ten years, beginning as a straightforward tool for adding animated graphics and gradually evolving into a platform for developing interactive content. It’s perfectly reasonable for .NET developers to create web sites that use Flash content. However, doing so requires a separate design tool and a completely different programming language (ActionScript) and programming environment (Flex). Further-more, there’s no straightforward way to integrate Flash content with server-side .NET code. For example, creating Flash applications that call .NET components is awkward at best.

Using server-side .NET code to render Flash content (for example, a custom ASP.NET control that spits out a Flash content region) is far more difficult. Silverlight aims to give .NET developers a better option for

Page 26: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 16 creating rich web content. Silverlight provides a browser plug-in with many similar features to Flash, but one that’s designed from the ground up for .NET. Silverlight natively supports the C# language and embraces a range of .NET concepts. As a result, developers can write client-side code for Silverlight in the same language they use for server-side code (such as C# and VB) and use many of the same abstractions (including streams, controls, collections, generics, and LINQ Language-Integrated Query). [11]

2.6.3 Feature of Silverlight

The Silverlight plug-in has an impressive list of features, some of which are shared in common with Flash, and a few of which are entirely new and even revolutionary. Here are some highlights:

2D Drawing: Silverlight provides a rich model for 2D drawing. Best of all, the content you draw is defined as shapes and paths, so you can manipulate this content on the client side. You can even respond to events (like a mouse click on a portion of a graphic), which makes it easy to add interactivity to anything you draw.

Controls: Developers don’t want to reinvent the wheel, so Silverlight is stocked with a few essentials, including buttons, text boxes, lists, and even a DataGrid. Best of all, these basic building blocks can be restyled with custom visuals if you want all of the functionality but none of the stock look.

Animation: Silverlight has a time-based animation model that lets you define what should happen and how long it should take. The Silverlight plug-in handles the sticky details, like interpolating intermediary values and calculating the frame rate.

Media: Silverlight provides playback of a range of video standards, including high-definition H.264 video and AAC audio. Silverlight doesn’t use the Windows Media Player ActiveX control or browser plug-in– instead, you can create any front-end you want, and you can even show video in full-screen mode. Microsoft also provides a free companion hosting service (at http://silverlight.live.com) that gives you space to store media files. Currently, it offers a generous 10 GB.

The Common Language Runtime: Most impressively, Silverlight includes a scaled-down version of the CLR, complete with an essential set of core classes, a garbage collector, a JIT (just-in-time) compiler, support for generics, threading, and so on. In many cases, developers can take code written for the full .NET CLR and use it in a Silverlight application with only moderate changes.

Networking: Silverlight applications can call old-style ASP.NET web services (.asmx) or WCF (Windows Communication

Page 27: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 17

Foundation) web services. They can also send manually created XML requests over HTTP and even open direct socket connections for fast two-way communication. This gives developers a great way to combine rich client-side code with secure server-side routines.

Data binding: Although it’s not as capable as in its big brother (WPF), Silverlight data binding provides a convenient way to display large amounts of data with minimal code. You can pull your data from XML or in-memory objects, giving you the ability to call a web service, receive a collection of objects, and display their data in a web page–often with just a couple of lines of code. [12]

There is the features matrix that demonstrates the new capabilities in silverlight 3 with comparison of Silverlight 1 and 2. [Appendix A]

2.6.4 Advantage and Disadvantage of Silverlight

The advantage of the plug-in model is that the user needs to install just a single component to see content created by a range of different people and companies. Installing the plug-in requires a small download and forces the user to confirm the operation in at least one security dialog box. It takes a short but definite amount of time, and it’s an obvious inconvenience.

However, once the plug-in is installed, the browser can process any content that uses the plug-in seamlessly, with no further prompting.

Silverlight is designed to overcome the limitations of ordinary HTML to allow developers to create more graphical and interactive applications. However, Silverlight isn’t a way for developers to break out of the browser’s security sandbox. For the most part, Silverlight applications are limited in equivalent ways to ordinary web pages. For example, a Silverlight application is allowed to create and access files, but only those files that are stored in a special walled-off isolated storage area. Conceptually, isolated storage works like the cookies in an ordinary web page. Files are separated by website and the current user, and size is limited.

Of course, it’s just as important to note what Silverlight doesn’t include. Silverlight is a new technology that’s evolving rapidly, and it’s full of stumbling blocks for developers who are used to relying on .NET’s rich libraries of prebuilt functionality. Prominent gaps include lack of database support (there’s no ADO.NET), no support for 3D drawing, no printing, no command model, and few rich controls like trees and menus (although many developers and component companies are building their own).[12]

Page 28: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 18 2.6.5 Silverlight 4 Beta

Silverlight 4 delivers a full suite of powerful capabilities to business application developers, bringing the best-of-breed .NET platform to browser-based experiences. Silverlight provides an ideal platform for developing and deploying modern business applications for both customer facing and staff-facing applications. [13]

2.6.6 New Features in Silverlight 4 Beta

Comprehensive printing support enabling hardcopy reports and documents as well as a virtual print view, independent of screen content.

A full set of forms controls with over 60 customizable, style able components. New controls include Rich Textbox with hyperlinks, images and editing and Masked textbox for complex field validation. Enhanced controls include DataGrid with sortable/resizeable columns and copy/paste rows.

WCF RIA (Windows Communication Foundation) Services introduces enterprise class networking and data access for building n-tier applications including transactions, paging of data, WCF and HTTP enhancements.

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

The .NET Common Runtime (CLR) now enables the same compiled code to be run on the desktop and Silverlight without change.

Enhanced data binding support increases flexibility and productivity through data grouping/editing and string formatting within bindings.

Managed Extensibility Framework supports building large composite applications.

Exclusive tooling support for Silverlight, new in Visual Studio 2010. Including a full editable design surface, drag & drop data-binding, automatically bound controls, data source selection, integration with Expression Blend styling resources, Silverlight project support and full IntelliSense. [13]

Page 29: Design & Implementation of Dynamic Silverlight.pdf

Charter Two: Silverlight Theory 19 2.7 XAML

XAML (short for Extensible Application Markup Language, and pronounced “zammel”) is a markup language used to instantiate .NET objects. Although XAML is a technology that can be applied to many different problem domains, it was initially designed as a part of Wind-ows Presentation Foundation (WPF), where it allows Windows develop-pers to construct rich user interfaces. When building user interfaces for Silverlight applications, he use the same standard. [11]

XAML provides a unified markup that can not only describe what a control is and how it fits into a page, but also how layout, and more importantly, the overall look and feel of the controls on a page are defined. A designer can use XAML to create a mock-up of a page or an application, and a developer can take that XAML markup and use it directly in his project files. Because partial classes and code behind files in the latest versions of Visual Studio allow the designer to separate the code logic from the layout and control definitions, using XAML gives the opportunity to have this separation of the design from the code.

XAML is a case-sensitive declarative language, based on XML (eXtensible Markup Language), that lets the designer create the user interface of a Silverlight application in a descriptive markup. Similar to the way ASP.NET or Windows Forms work with the concept of a code behind file, the designer can specify code files that contain JavaScript that respond to events and manipulate the objects created in the XAML file. XAML is so important for the evolution of how the designer create the user interface because the user interface is separate from the code files. This means that a designer using tools like Expression Blend can create a UI using XAML, and that same XAML can be used in Visual Studio 2005 and integrated into a larger project. As a matter of fact, Expression Blend and Visual Studio 2005 share the same project structure, so the files can be opened by either tool. the ability for a designer to express a user interface and have it directly used without alteration in an application is something that has never been possible with Microsoft tools. There has always been a large amount of throw-away art work, because developers would get a mock-up and try to duplicate it. [9]

Page 30: Design & Implementation of Dynamic Silverlight.pdf

Chapter Three

Design & Implementation

Page 31: Design & Implementation of Dynamic Silverlight.pdf

21 Chapter Three: Design & Implementation

3.1 Master Page The master page contains four navigation buttons and three Silverlight objects.

The buttons are from left to right:

1. Direction Map: It navigates the direction map page. 2. Airports Sites: It navigates the airports sites page. 3. Flight Schedule: It navigates the flight schedule page. 4. Contact Us: It navigates the contact us page.

The Silverlight objects:

1. The header object: Is the title of the simulation in which feature animation is used.

2. The left side object: Is a chart that shows number of passengers per airport.

3. The right side object: Is a media player element at which the browser can get information about the airline.[Appendix B]

The mechanism of loading the Master Page is shown in Figure 3.1; figure 3-2 shows the Master Page.

Page 32: Design & Implementation of Dynamic Silverlight.pdf

22 Chapter Three: Design & Implementation

Fig 3-1 flowchart of Master Page

Start

Client request for Master Page

Server Response contain of page after creates

Browser checking for

Silverlight plug-in is installed?

Install Microsoft Silverlight

No

Yes

Browser Initialize Component

End

Page 33: Design & Implementation of Dynamic Silverlight.pdf

23 Chapter Three: Design & Implementation

Fig 3-2 Master Page

3.2 Direction Map page

It is the page at which the aim of the project is shown, where parameters are passed from the server-side to the client-side.

This page also contains four text boxes that show the data during the movement of the airplane:

The first box shows the total distance from source to destination. The second box shows the total trip time. The third box shows the distance remained to destination, and The forth box shows the time left to destination.

By pushing a button in the Asp side the parameters passes to the Silverlight object, and moves the plane from source to destination according to the parameters sent from server-side. [Appendix C]

Page 34: Design & Implementation of Dynamic Silverlight.pdf

24 Chapter Three: Design & Implementation

The mechanism of passing parameter shows in figure 3-3, figure 3-4 shows the Direction Map page.

Fig 3-3 flowchart of passing parameter

Start

Select the source Airport from ASP.NET =X

Select the destination Airport from ASP.NET =Y

Click Take Off

If ((X & Y) ==(X &

Y)) in Client side

XtoY.Begin()

End

Yes

No

Browser Initialize Component

Page 35: Design & Implementation of Dynamic Silverlight.pdf

25 Chapter Three: Design & Implementation

Fig 3-4 Direction Map page

Page 36: Design & Implementation of Dynamic Silverlight.pdf

26 Chapter Three: Design & Implementation

3.3 Airports Sites page

This page contains a panel in which the sites of the airports are shown as a carousel, with four sliders and a checkbox each controls a certain function. [Appendix D]

The first slider controls the height of Carousel. The second slider controls the width of Carousel. The third slider controls the automatic speed of the item`s rotation. The forth slider controls the apparent perspective of the item. The checkbox controls the direction of the rotation (clockwise,

counter-clockwise), and the speed of the rotation adjusted by the curser (edge faster and center slower).

Fig 3-5 Airports Sites page

Page 37: Design & Implementation of Dynamic Silverlight.pdf

27 Chapter Three: Design & Implementation

3.4 Flight Schedule page

Using data grid feature in Silverlight this page shows the schedule of the flights (includes departing time, departing, arriving time, arriving and day of journey) for a cetin period of time. [Appendix E]

Fig 3.4 Flight Schedule page

Page 38: Design & Implementation of Dynamic Silverlight.pdf

28 Chapter Three: Design & Implementation

3.5 Contact Us page

Unlike the three previous pages this page is not Silverlight. It shows how to access Computer Engineering & Information Technology Dept. by showing its email and web site address. [Appendix F]

Fig 3.5 Contact Us page

Page 39: Design & Implementation of Dynamic Silverlight.pdf

Chapter Four Conclusion & Future Works

Page 40: Design & Implementation of Dynamic Silverlight.pdf

30Chapter Four: Conclusion & Future Works

4.1 Conclusions

1. We concluded from this project that we could save time and effort as well as money by evolving this technique.

If we Consider the below points: The compatibility that Silverlight provided through using the same

language at both sides (server side and client side). Known that this compatibility was not available in Adobe Flash.

The flexibility and the attraction that the Silverlight adds to the site is more than the HTML and Java Script.

This technique provides adding the plug-in to the client side browser through four Mega (4 M).

The above mentioned points means that the .NET developer has now

more work flexibility by being able to get use of RIA (rich Internet application) in his ASP.NET sites.

2. Unlike the above mentioned positive conclusion, we found a drawback in the idea of using Silverlight technique. This drawback was found during the simulation of the airlines movement data show while having Silverlight object in the master page, and clicking on the navigated button to go to the other page the objects will be reloaded. Also the delay of the reloading can be considered as a drawback (the Manipulation of the object).

But in general benefit got from this technique is more valuable than the weak points found in it.

Page 41: Design & Implementation of Dynamic Silverlight.pdf

31Chapter Four: Conclusion & Future Works

4.2 Suggestions for Future works

Expand the direction map page by adding more arguments to it. We can also add more airports to the map.

Add on-line reservations through providing connection between Airline Companies and client, after checking the client's validation of his account in the bank.

Add connection to hardware (like printer): After checking on the validation of the client, to enable him to print his tickets.

Add connection to database: the flight schedule can retrieve the data from database.

Page 42: Design & Implementation of Dynamic Silverlight.pdf

The References 32

References

[1].Internet Paper, SilverlightAirplain,“http://www.silverlight.net/content/samples/sl2/silverlightairlines/run/default.html”, 14-04-10

[2].Behrouz.A.Forouzan, “Data communications and networking”, McGraw-HilI Forouzan networking series, 4th Edition, 2007

[3].Matthew MacDonald, “Beginning ASP.NET 3.5 in C# 2008 From Novice to Professional”, Apress, 2nd Edition, Nov.2007”.

[4].A. Russell Jones,“Mastering ASP.NET with C#”, SYBEX Inc., 1st Edition,2002

[5].Simon Robinson; Christian Nagel “Professional C Sharp”, 3rd Edition, 2004.

[6].Ken Cox, “ASP.NET.3.5.For.Dummies”, Wiley Publishing Inc., 1st Edition, Feb 2008.

[7].Matthew MacDonald; Mario Szpuszta, “Pro ASP.NET 2.0 in C# 2005”, Apress ,1st

[8].Internet Paper, “

Edition, Sep.2005.

http://www.microsoft.com/silverlight/overview/default.aspx” , 25-01-10

[9].Devin Rader; Jason Beres, “Silverlight 1.0” , Wiley Publishing, Inc.,1st Edition, 2008.

[10].Christian Wenz, “Essential Silverlight”, O’Reilly Media, Inc., 1st Edition, 2007.

[11]. Matthew MacDonald,” Silverlight 2 Visual Essentials”, Apress, 1st Edition, Jun 2008.

[12].Matthew MacDonald, “Pro Silverlight 3 in C#” , Apress, 1st

[13].Internet Paper “

Edition,2009

http://silverlight.net/getstarted/silverlight-4-beta/”, 29-01-10.

[14].Internet Paper, “http://silverlight.net/getstarted/overview.aspx” , 28-01-10.

Page 43: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Appendix A

Features Matrix

The Features Matrix below provides an overview of the new capabilities in Silverlight 3. Silverlight 3 is able to run Silverlight 2 and Silverlight 1.0 applications without change. [12]

Features Silverlight 1.0 Silverlight 2 Silverlight 3 Cross-Browser Support for Firefox, IE, Safari

Cross-Platform Support for Windows and Mac (and Linux through the Moonlight Project)

2D Vector Animation/Graphics

AJAX Support HTML DOM Integration HTTP Networking Canvas Layout Support JavaScript Support Silverlight ASP.NET Controls (asp:media, asp:xaml)

XAML Parser (based on WPF) Media – 720P High Definition (HD) Video Media – Audio/Video Support (VC-1, WMV, WMA, MP3)

Media – Image Support (JPG, PNG)

Page 44: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Media Markers Windows Media Server Support Support for Visual Basic.NET and C#; Common Language Runtime (CLR) based languages

Support for IronPython, IronRuby, Managed JScript, and other Dynamic Language Runtime (DLR) based languages

Rich Core Framework (e.g. Generics, collections)

Multi-Threading Layout controls including StackPanel and Grid

Full suite of Controls (TextBox, RadioButton, Slider, Calendar, DatePicker, DataGrid, ListBox, TabControl, and others)

Managed Control Framework Templating Model Visual State Manager Isolated Storage Deep Zoom Technology Media – DRM Powered by PlayReady

Media - Windows Media Audio 10

Page 45: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Professional support Media - MediaStreamSource for managed code media file parser and protocol extensibility

High quality resizing Media - Basic SSPL Support

Cross Domain Network Access

Easy access to server-side data via Web Services

Direct access to TCP sockets

Interoperability with SOAP and REST services, including support for XML, JSON, RSS and Atom data formats

LINQ (including LINQ to XML, LINQ to JSON, and LINQ to Entities)

Duplex communications (“push” from Server to Silverlight client)

Data Binding ADO.NET Data Services

Managed HTML Bridge

Managed Exception Handling

.NET Framework

Page 46: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Security Enforcement Type Safety Verification

XMLReader/Writer Enhanced Keyboard Input Support

File Upload Support (via WebClient API)

WPF Compatibility Accessibility Localization Remote Debugging (PC and Mac)

Out of Browser Network Status (Offline)

Pixel Shader Effects Bitmap API Theming at runtime Enhanced Control Skinning

Accessibility - System Colors

Bitmap caching Perspective 3D GPU Hardware Acceleration (for video and bitmaps)

Text Animation H.264 Support Raw A/V Support File Save Dialog DockPanel, WrapPanel, Viewbox

Local Fonts Element to Element Binding

Local Connection Binary XML Component Caching (share resources across

Page 47: Design & Implementation of Dynamic Silverlight.pdf

Appendices

apps) Scene caches (to Bitmap)

Page 48: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Appendix B MasterPage.master.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class MasterPage : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { } } Header.XAML <UserControl x:Class="header.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="1200"> <UserControl.Resources> <Storyboard x:Name="header" RepeatBehavior="forever"> <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Color)"> <EasingColorKeyFrame KeyTime="00:00:00" Value="#7F8D8D94"/> </ColorAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Offset)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.928"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Offset)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.406"/> </DoubleAnimationUsingKeyFrames> <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"> <EasingColorKeyFrame KeyTime="00:00:00.4000000" Value="#FE1773C0"/> <EasingColorKeyFrame KeyTime="00:00:01" Value="#FF8BC3F2"/> <EasingColorKeyFrame KeyTime="00:00:01.5000000" Value="#FE327AB4"/> <EasingColorKeyFrame KeyTime="00:00:03" Value="#FEAEC8DE"/> <EasingColorKeyFrame KeyTime="00:00:04" Value="#FF3496E8"/> <EasingColorKeyFrame KeyTime="00:00:05" Value="#FE1367AD"/>

Page 49: Design & Implementation of Dynamic Silverlight.pdf

Appendices <EasingColorKeyFrame KeyTime="00:00:06" Value="#FF6798C1"/> <EasingColorKeyFrame KeyTime="00:00:06.6000000" Value="#FEBCCEDE"/> <EasingColorKeyFrame KeyTime="00:00:08" Value="#FFADCCE6"/> <EasingColorKeyFrame KeyTime="00:00:09" Value="#FE2368A3"/> <EasingColorKeyFrame KeyTime="00:00:10" Value="#FF69B4F4"/> <EasingColorKeyFrame KeyTime="00:00:11" Value="#FEBED5E9"/> <EasingColorKeyFrame KeyTime="00:00:12" Value="#FE15436C"/> <EasingColorKeyFrame KeyTime="00:00:13" Value="#FF9ABFDE"/> <EasingColorKeyFrame KeyTime="00:00:15" Value="#FFAEC8E0"/> </ColorAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <EasingDoubleKeyFrame KeyTime="00:00:03" Value="-124"/> <EasingDoubleKeyFrame KeyTime="00:00:06" Value="-129"/> <EasingDoubleKeyFrame KeyTime="00:00:06.5000000" Value="-107.167"/> <EasingDoubleKeyFrame KeyTime="00:00:09" Value="2"/> <EasingDoubleKeyFrame KeyTime="00:00:11" Value="140"/> <EasingDoubleKeyFrame KeyTime="00:00:13" Value="137"/> <EasingDoubleKeyFrame KeyTime="00:00:15" Value="1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <EasingDoubleKeyFrame KeyTime="00:00:03" Value="-17"/> <EasingDoubleKeyFrame KeyTime="00:00:06" Value="37"/> <EasingDoubleKeyFrame KeyTime="00:00:09" Value="33"/> <EasingDoubleKeyFrame KeyTime="00:00:11" Value="34"/> <EasingDoubleKeyFrame KeyTime="00:00:13" Value="-12"/> <EasingDoubleKeyFrame KeyTime="00:00:15" Value="1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:01.5000000" Value="-1"/> <EasingDoubleKeyFrame KeyTime="00:00:02.5000000" Value="1.03"/> <EasingDoubleKeyFrame KeyTime="00:00:03" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:06" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:06.5000000" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:09" Value="0.4"/> <EasingDoubleKeyFrame KeyTime="00:00:10" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:11" Value="0.3"/> <EasingDoubleKeyFrame KeyTime="00:00:12.1000000" Value="0.6"/> <EasingDoubleKeyFrame KeyTime="00:00:13" Value="0.30000001192092896"/> <EasingDoubleKeyFrame KeyTime="00:00:14" Value="0.5"/> <EasingDoubleKeyFrame KeyTime="00:00:15" Value="1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"> <EasingDoubleKeyFrame KeyTime="00:00:03" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:04" Value="-1"/>

Page 50: Design & Implementation of Dynamic Silverlight.pdf

Appendices <EasingDoubleKeyFrame KeyTime="00:00:05" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:06" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:06.5000000" Value="1"/> <EasingDoubleKeyFrame KeyTime="00:00:09" Value="0.45"/> <EasingDoubleKeyFrame KeyTime="00:00:10" Value="0.8"/> <EasingDoubleKeyFrame KeyTime="00:00:11" Value="0.44999998807907104"/> <EasingDoubleKeyFrame KeyTime="00:00:13" Value="0.44999998807907104"/> <EasingDoubleKeyFrame KeyTime="00:00:14" Value="0.5"/> <EasingDoubleKeyFrame KeyTime="00:00:15" Value="1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)"> <EasingDoubleKeyFrame KeyTime="00:00:06" Value="0.5"/> <EasingDoubleKeyFrame KeyTime="00:00:06.5000000" Value="0.5"/> <EasingDoubleKeyFrame KeyTime="00:00:09" Value="0.5"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleX)"> <EasingDoubleKeyFrame KeyTime="00:00:06" Value="0"/> <EasingDoubleKeyFrame KeyTime="00:00:06.5000000" Value="5"/> <EasingDoubleKeyFrame KeyTime="00:00:09" Value="0"/> </DoubleAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBlock1" Storyboard.TargetProperty="(TextBlock.FontFamily)"> <DiscreteObjectKeyFrame KeyTime="00:00:02.5000000"> <DiscreteObjectKeyFrame.Value> <FontFamily>Times New Roman</FontFamily> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> <DiscreteObjectKeyFrame KeyTime="00:00:02.8000000"> <DiscreteObjectKeyFrame.Value> <FontFamily>MS Mincho</FontFamily> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> <DiscreteObjectKeyFrame KeyTime="00:00:03"> <DiscreteObjectKeyFrame.Value> <FontFamily>Times New Roman</FontFamily> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </UserControl.Resources> <Grid x:Name="LayoutRoot" Height="100" Width="1200" Loaded="onload" Background="#FFC6DFF4"> <Grid.ColumnDefinitions> <ColumnDefinition Width="0*" /> <ColumnDefinition Width="1088*" /> <ColumnDefinition Width="0*" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="1" Height="39" HorizontalAlignment="Center" Margin="286,23,303,0" Name="textBlock1" Text=" Airlines Movement DataShow" VerticalAlignment="Top" Width="499" TextAlignment="Center" TextWrapping="NoWrap" FontSize="28" FontFamily="Times New Roman" RenderTransformOrigin="0.5,0.5" > <TextBlock.Foreground> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0.329"/> <GradientStop Color="White" Offset="1"/>

Page 51: Design & Implementation of Dynamic Silverlight.pdf

Appendices </LinearGradientBrush> </TextBlock.Foreground> <TextBlock.Projection> <PlaneProjection/> </TextBlock.Projection> <TextBlock.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </TextBlock.RenderTransform> </TextBlock> <TextBlock Height="24" HorizontalAlignment="Left" Margin="-11,12,0,0" Name="textBlock2" Text=" ''Nothing happened untill " VerticalAlignment="Top" Width="203" FontSize="14" Grid.ColumnSpan="2"><TextBlock.Foreground><LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"><GradientStop Color="Black" Offset="0" /><GradientStop Color="White" Offset="0.047" /></LinearGradientBrush></TextBlock.Foreground></TextBlock> <Image Grid.Column="1" Height="100" HorizontalAlignment="Left" Margin="978,0,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="100" Source="/header;component/Silver.png" /> <TextBlock FontSize="14" Grid.Column="1" Height="24" HorizontalAlignment="Left" Margin="99,33,0,0" Name="textBlock3" Text=" something moves ''" VerticalAlignment="Top" Width="150"><TextBlock.Foreground><LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"><GradientStop Color="Black" Offset="0" /><GradientStop Color="White" Offset="0" /></LinearGradientBrush></TextBlock.Foreground></TextBlock> </Grid> </UserControl> Media_element.XAML <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:ExpressionMediaPlayer="clr-namespace:ExpressionMediaPlayer;assembly=MediaPlayer" x:Class="media_player.MainPage" d:DesignHeight="800" d:DesignWidth="200"> <Grid x:Name="LayoutRoot" Background="White"> <ExpressionMediaPlayer:MediaPlayer Height="200" VerticalAlignment="Top"> <ExpressionMediaPlayer:MediaPlayer.Playlist> <ExpressionMediaPlayer:Playlist StretchMode="Uniform" AutoPlay="False" AutoLoad="False"> <ExpressionMediaPlayer:Playlist.Items> <ExpressionMediaPlayer:PlaylistItem MediaSource="Media element/New%20-%20UK%20Modern%20IA.wmv" ThumbSource="Media element/New%20-%20UK%20Modern%20IA_Thumb.jpg" Title="Media element/New%20-%20UK%20Modern%20IA"/> </ExpressionMediaPlayer:Playlist.Items> </ExpressionMediaPlayer:Playlist> </ExpressionMediaPlayer:MediaPlayer.Playlist> </ExpressionMediaPlayer:MediaPlayer> <TextBlock Margin="0,216,24,0" Name="textBlock1" Text="The Iraqi Airways video" TextAlignment="Center" FontSize="12" FontFamily="Times New Roman" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" Width="151" /> <TextBlock Margin="0,278,0,0" Name="textBlock2" Text="Ten Things You should know about the Airlines :" TextWrapping="Wrap" FontSize="14" FontFamily="Times New Roman" Height="40" VerticalAlignment="Top" />

Page 52: Design & Implementation of Dynamic Silverlight.pdf

Appendices <TextBlock Height="40" Margin="0,334,0,0" Name="textBlock3" Text="1. “Customer Service is always our priority.”" VerticalAlignment="Top" TextWrapping="Wrap" TextAlignment="Left" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,380,0,0" Name="textBlock4" Text="2. “The Airlines make travelling more comfortable.”" VerticalAlignment="Top" TextWrapping="Wrap" TextAlignment="Left" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,426,0,0" Name="textBlock5" Text="3. “The goal is to get our customer happy.”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,472,0,0" Name="textBlock6" Text="4. “We charge less fees for flights booked 6 months earlier. ”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,518,0,0" Name="textBlock7" Text="5. “No need to worry about your luggage.”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,564,0,0" Name="textBlock8" Text="6. “Meals are served around the clock.”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,610,0,0" Name="textBlock9" Text="7. “You find the lowest prices ever offered.”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,656,0,0" Name="textBlock10" Text="8. “The earlier you book the lower price you get.”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,702,0,0" Name="textBlock11" Text="9. “Enjoy the unforgettable resorts.”" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> <TextBlock Height="40" Margin="0,748,0,0" Name="textBlock12" Text="10. “You will reach the best places ever around the world.” " VerticalAlignment="Top" TextWrapping="Wrap" FontSize="12" FontFamily="Times New Roman" /> </Grid> </UserControl> Chart.XAML <UserControl xmlns:my="clr-namespace:header;assembly=header" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" x:Class="chart.MainPage" d:DesignHeight="700" d:DesignWidth="300"> <Grid x:Name="LayoutRoot" Background="White"> <Border BorderBrush="Silver" BorderThickness="0" Height="300" HorizontalAlignment="Left" Name="border1" VerticalAlignment="Top" Width="250" > <chartingToolkit:Chart Title="" Margin="0,-23,-109,0" Foreground="Black" BorderBrush="{x:Null}"> <chartingToolkit:Chart.DataContext> <PointCollection> <Point>12263,1</Point> <Point>7500,2</Point> <Point>6224,3</Point> <Point>1200,4</Point> <Point>750,5</Point> <Point>697,6</Point> </PointCollection> </chartingToolkit:Chart.DataContext> <chartingToolkit:ColumnSeries DependentValuePath="X" IndependentValuePath="Y" Margin="-3,0,-213,0" AnimationSequence="LastToFirst" ItemsSource="{Binding Mode=OneWay}"/> </chartingToolkit:Chart> </Border>

Page 53: Design & Implementation of Dynamic Silverlight.pdf

Appendices <TextBlock Height="22" HorizontalAlignment="Left" Margin="12,306,0,0" Name="textBlock1" Text="Passenger/Airport" VerticalAlignment="Top" Width="238" TextAlignment="Center" FontFamily="Times New Roman" /> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,334,0,0" Name="textBlock2" Text="1-Baghdad International Airport" VerticalAlignment="Top" Width="238" FontSize="12" TextAlignment="Left" TextWrapping="NoWrap" FontFamily="Times New Roman" /> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,406,0,0" Name="textBlock3" Text="3-Basrah International Airport" VerticalAlignment="Top" Width="238" FontFamily="Times New Roman" FontSize="12" /> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,478,0,0" Name="textBlock4" Text="5-Al Najaf International Airport" VerticalAlignment="Top" Width="238" FontFamily="Times New Roman" FontSize="12" /> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,442,0,0" Name="textBlock5" Text="4-Suleimaniyah International Airport" VerticalAlignment="Top" Width="238" FontFamily="Times New Roman" FontSize="12" /> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,370,0,0" Name="textBlock6" Text="2-Erbil International Airport" VerticalAlignment="Top" Width="238" FontFamily="Times New Roman" FontSize="12" /> <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,514,0,0" Name="textBlock7" Text="6-Mosel International Airport" VerticalAlignment="Top" Width="238" FontFamily="Times New Roman" FontSize="12" /> <TextBlock Margin="1,556,0,0" Name="textBlock8" Text="The chart is according to the General Establishment of Civil Aviation, one of the Formations of the Ministry of Transport. It collected the information for the period 22 - 31 / 3 / 2010." TextWrapping="Wrap" FontFamily="Times New Roman" FontSize="14" Height="132" VerticalAlignment="Top" /> </Grid> </UserControl>

Page 54: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Appendix C Direction_Map.aspx.cs <script runat="server"> protected void take_off(object sender, EventArgs e) { Response.Redirect("ProjectTestPage.aspx?FName=" + DropDownList1.SelectedItem.Text.Trim() + "&LName=" + DropDownList2.SelectedItem.Text.Trim()); } </script>

Direction_Map.XAML <UserControl x:Class="Direction_Map.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="700"> <UserControl.Resources> <Storyboard x:Name="Bag2Mos"> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBox1" Storyboard.TargetProperty="(TextBox.Text)"> <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="396"/> <DiscreteObjectKeyFrame KeyTime="00:00:00.5000000" Value="356"/> <DiscreteObjectKeyFrame KeyTime="00:00:01" Value="316"/> <DiscreteObjectKeyFrame KeyTime="00:00:01.5000000" Value="276"/> <DiscreteObjectKeyFrame KeyTime="00:00:02" Value="236"/> <DiscreteObjectKeyFrame KeyTime="00:00:02.5000000" Value="196"/> <DiscreteObjectKeyFrame KeyTime="00:00:03" Value="156"/> <DiscreteObjectKeyFrame KeyTime="00:00:03.5000000" Value="116"/> <DiscreteObjectKeyFrame KeyTime="00:00:04" Value="76"/> <DiscreteObjectKeyFrame KeyTime="00:00:04.4000000" Value="36"/> <DiscreteObjectKeyFrame KeyTime="00:00:05" Value="0"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBox2" Storyboard.TargetProperty="(TextBox.Text)"> <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="60"/> <DiscreteObjectKeyFrame KeyTime="00:00:00.5000000" Value="54"/> <DiscreteObjectKeyFrame KeyTime="00:00:01" Value="48"/> <DiscreteObjectKeyFrame KeyTime="00:00:01.5000000" Value="42"/> <DiscreteObjectKeyFrame KeyTime="00:00:02" Value="36"/> <DiscreteObjectKeyFrame KeyTime="00:00:02.5000000" Value="30"/> <DiscreteObjectKeyFrame KeyTime="00:00:03" Value="24"/> <DiscreteObjectKeyFrame KeyTime="00:00:03.5000000" Value="18"/> <DiscreteObjectKeyFrame KeyTime="00:00:04" Value="12"/> <DiscreteObjectKeyFrame KeyTime="00:00:04.4000000" Value="6"/>

Page 55: Design & Implementation of Dynamic Silverlight.pdf

Appendices <DiscreteObjectKeyFrame KeyTime="00:00:05" Value="0"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBox3" Storyboard.TargetProperty="(TextBox.Text)"> <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="60"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBox4" Storyboard.TargetProperty="(TextBox.Text)"> <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="396"/> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="airplane" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"> <EasingDoubleKeyFrame KeyTime="00:00:05" Value="-85.405"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="airplane" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"> <EasingDoubleKeyFrame KeyTime="00:00:05" Value="-137.868"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="line" Storyboard.TargetProperty="(Line.X2)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <EasingDoubleKeyFrame KeyTime="00:00:05" Value="70"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="line" Storyboard.TargetProperty="(Line.Y2)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/> <EasingDoubleKeyFrame KeyTime="00:00:05" Value="140"/> </DoubleAnimationUsingKeyFrames>

</UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White" Width="700"> <Image Height="500" HorizontalAlignment="Left" Name="Iraq_map" Stretch="Fill" VerticalAlignment="Top" Width="700" Source="/Project;component/Iraq.jpg" /> <Image Height="20" HorizontalAlignment="Left" Margin="392,215,0,0" Name="airplane" Stretch="Uniform" VerticalAlignment="Top" Width="20" Source="/Project;component/airplane.png" RenderTransformOrigin="0.57,0.044" UseLayoutRounding="False" d:LayoutRounding="Auto" > <Image.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform Angle="-111.322"/> <TranslateTransform X="-10.405" Y="11.132"/> </TransformGroup> </Image.RenderTransform> </Image> <TextBlock Height="25" HorizontalAlignment="Right" Margin="0,450,252,0" Name="textBlock1" Text=" Airlines Movement DataShow" VerticalAlignment="Top" Width="200" FontStretch="Normal" FontStyle="Normal" /> <Ellipse Height="10" HorizontalAlignment="Left" Margin="10,303,0,0" Name="ellipse1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="10" Fill="#6912A2AD" /> <Ellipse Height="10" HorizontalAlignment="Right" Margin="0,287,304,0" Name="ellipse2" StrokeThickness="1" VerticalAlignment="Top" Width="10" Fill="#6912A2AD" Stroke="Black"></Ellipse> <Ellipse Height="10" HorizontalAlignment="Right" Margin="0,112,229,0" Name="ellipse3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="10" Fill="#6912A2AD" />

Page 56: Design & Implementation of Dynamic Silverlight.pdf

Appendices <Ellipse Height="10" HorizontalAlignment="Right" Margin="0,224,295,0" Name="ellipse4" StrokeThickness="1" VerticalAlignment="Top" Width="10" Fill="#6912A2AD" Stroke="Black" /> <Line x:Name="line" Stroke="Red" StrokeThickness="2" StrokeDashArray="1" X1="0" Y1="0" X2="0" Y2="0" Margin="328.956,80.95,300.78,0" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Height="140.717" VerticalAlignment="Top"> <Line.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform Angle="-179.739"/> <TranslateTransform/> </TransformGroup> </Line.RenderTransform> </Line> <Ellipse Height="10" HorizontalAlignment="Right" Margin="0,81,322,0" Name="ellipse5" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="10" Fill="#6912A2AD" /> <Ellipse Height="10" HorizontalAlignment="Left" Margin="319,72,0,0" Name="ellipse6" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="10" Fill="#6912A2AD" /> <TextBlock Height="23" HorizontalAlignment="Left" Margin="27,299,0,0" Name="textBlock2" Text="Airport" VerticalAlignment="Top" Width="120" /> <TextBlock Height="20" HorizontalAlignment="Left" Margin="10,407,0,0" Name="textBlock3" Text="Distance to Destination in Km :" VerticalAlignment="Top" Width="175" /> <TextBlock Height="20" HorizontalAlignment="Left" Margin="10,433,0,0" Name="textBlock4" Text="Timeleft in minute :" VerticalAlignment="Top" Width="175" /> <Ellipse Fill="#6912A2AD" Height="10" HorizontalAlignment="Left" Margin="624,357,0,0" Name="ellipse7" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="10" /> <TextBox HorizontalAlignment="Right" Margin="0,407,464,0" Name="textBox1" Width="35" ToolTipService.ToolTip="" Height="20" VerticalAlignment="Top" /> <TextBox Height="20" HorizontalAlignment="Right" Margin="0,433,464,0" Name="textBox2" VerticalAlignment="Top" Width="35" /> <TextBox Height="20" HorizontalAlignment="Right" Margin="0,378,553,0" Name="textBox3" VerticalAlignment="Top" Width="35" /> <TextBlock Height="20" HorizontalAlignment="Left" Margin="12,378,0,0" Name="textBlock6" Text="Total Time :" VerticalAlignment="Top" Width="90" /> <TextBlock Height="20" HorizontalAlignment="Left" Margin="10,351,0,0" Name="textBlock7" Text="Total Distance :" VerticalAlignment="Top" Width="92" /> <TextBox Height="20" HorizontalAlignment="Right" Margin="0,351,553,0" Name="textBox4" VerticalAlignment="Top" Width="35" /> <Line x:Name="line_Copy" Stroke="Red" StrokeThickness="2" StrokeDashArray="1" X1="0" Y1="0" X2="0" Y2="0" Margin="328.956,80.95,300.78,0" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Height="140.717" VerticalAlignment="Top"> <Line.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform Angle="-179.739"/> <TranslateTransform/> </TransformGroup> </Line.RenderTransform> </Line> <Line x:Name="line_Copy1" Stroke="Red" StrokeThickness="2" StrokeDashArray="1" X1="0" Y1="0" X2="0" Y2="0" Margin="328.956,80.95,300.78,0" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Height="140.717" VerticalAlignment="Top"> <Line.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform Angle="-179.739"/> <TranslateTransform/>

Page 57: Design & Implementation of Dynamic Silverlight.pdf

Appendices </TransformGroup> </Line.RenderTransform> </Line> </Grid> </UserControl>

Direction_Map.XAML.CS using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using System.Windows.Browser; namespace Project { public partial class MainPage : UserControl { string fName = String.Empty; string lName = String.Empty; public MainPage() { InitializeComponent(); this.Loaded += new RoutedEventHandler(Page_Loaded); } void Page_Loaded(object sender, RoutedEventArgs e) { IDictionary<string, string> qString = HtmlPage.Document.QueryString; foreach (KeyValuePair<string, string> kvp in qString) { string k = kvp.Key; string v = kvp.Value; if (k == "FName") fName = v; else if (k == "LName") lName = v; } if ((fName == "Baghdad") && (lName == "Mosel")) Bag2Mos.Begin(); if ((fName == "Baghdad") && (lName == "Basrah")) Bag2Bas.Begin(); if ((fName == "Baghdad") && (lName == "Najaf")) Bag2Naj.Begin(); if ((fName == "Baghdad") && (lName == "Erbil")) Bag2Erb.Begin(); if ((fName == "Baghdad") && (lName == "Suleimaniyah")) Bag2Sul.Begin(); if ((fName == "Mosel") && (lName == "Baghdad")) Mos2Bag.Begin();

Page 58: Design & Implementation of Dynamic Silverlight.pdf

Appendices if ((fName == "Mosel") && (lName == "Basrah")) Mos2Bas.Begin(); if ((fName == "Mosel") && (lName == "Najaf")) Mos2Naj.Begin(); if ((fName == "Mosel") && (lName == "Suleimaniyah")) Mos2Sul.Begin(); if ((fName == "Basrah") && (lName == "Baghdad")) Bas2Bag.Begin(); if ((fName == "Basrah") && (lName == "Mosel")) Bas2Mos.Begin(); } } }

Page 59: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Appendix D

Airports_sites.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class CarouselSilverlight : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } Airports_sites.XAML <UserControl xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" x:Class="Carousel.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:custom="clr-namespace:CarouselCustomControl;assembly=CarouselCustomControl" mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="700"> <Grid x:Name="LayoutRoot" Background="White" Width="700" > <Grid.RowDefinitions> <RowDefinition Height="45" /> <RowDefinition Height="273" /> <RowDefinition Height="182" /> </Grid.RowDefinitions> <TextBlock Text="The Iraqi Airports Sites" FontFamily="Times New Roman" FontSize="24" HorizontalAlignment="Center" Grid.Row="0"/> <custom:CarouselPanel x:Name="cPanel" Grid.Row="1" Width="{Binding Width}" Height="{Binding Height}" Speed="{Binding Speed}" UseMousePosition="{Binding UseMousePosition}" ScalePerspective="{Binding ScalePerspective}" Background="#FFF2DEF1" >

Page 60: Design & Implementation of Dynamic Silverlight.pdf

Appendices <HyperlinkButton FontFamily="Times New Roman" FontSize="14" Height="30" Width="200" Content="Baghdad International Airport " NavigateUri="http://iraqiairways46.com/arabic/index.php" TargetName="_blank"/> <HyperlinkButton FontFamily="Times New Roman" FontSize="14" Height="30" Width="200" Content="Al Najaf International Airport " NavigateUri="http://www.alnajafairport.com/" TargetName="_blank"/> <HyperlinkButton FontFamily="Times New Roman" FontSize="14" Height="30" Width="200" Content="Erbil International Airport " NavigateUri="http://www.erbil-airport.net/" TargetName="_blank"/> <HyperlinkButton FontFamily="Times New Roman" FontSize="14" Height="30" Width="200" Content="Basrah International Airport" NavigateUri="http://www.motrans.gov.iq/index.php" TargetName="_blank"/> <HyperlinkButton FontFamily="Times New Roman" FontSize="14" Height="30" Width="200" Content="Suleimaniyah International Airport " NavigateUri="http://www.sulaimaniyahairport.com/" TargetName="_blank"/> <HyperlinkButton FontFamily="Times New Roman" FontSize="14" Height="30" Width="200" Content="Mosel International Airport " NavigateUri="http://www.iq-airways.com/AirqAirways/newsDetails.php?newsId=299" TargetName="_blank"/> </custom:CarouselPanel> <Grid Grid.Row="2"> <Grid.RowDefinitions> <RowDefinition Height="*" MaxHeight="30" /> <RowDefinition Height="*" MaxHeight="30" /> <RowDefinition Height="*" MaxHeight="30" /> <RowDefinition Height="*" MaxHeight="30" /> <RowDefinition Height="*" MaxHeight="30" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="428" /> <ColumnDefinition Width="214" /> <ColumnDefinition Width="53" /> </Grid.ColumnDefinitions> <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="0" Text="Height of Carousel Panel" TextWrapping="NoWrap" Margin="0,0,15,0" /> <Slider HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Width="200" x:Name="heightSlider" Value="{Binding Height, Mode=TwoWay}" Maximum="240" Minimum="120" /> <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="2" Grid.Row="0" Width="Auto"

Page 61: Design & Implementation of Dynamic Silverlight.pdf

Appendices Height="Auto" Text="{Binding Height}" FontStyle="Italic" TextWrapping="NoWrap" Margin="0,0,15,0" /> <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="0" Grid.Row="1" Text="Width of Carousel Panel" TextWrapping="NoWrap" Margin="0,0,15,0" /> <Slider HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="1" Width="200" x:Name="widthSlider" Value="{Binding Width, Mode=TwoWay}" Maximum="700" Minimum="500" /> <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="2" Grid.Row="1" Width="Auto" Height="Auto" Text="{Binding Width}" FontStyle="Italic" TextWrapping="NoWrap" Margin="0,0,15,0" /> <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="0" Grid.Row="2" Text=" Left=clockwise/Right=coutner-clockwise. Edges faster, center slower." TextWrapping="NoWrap" Margin="0,0,15,0" /> <CheckBox HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="2" Width="200" x:Name="useMouseCheck" IsChecked="{Binding UseMousePosition, Mode=TwoWay}" /> <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="0" Grid.Row="3" Text="Speed (Automatic - when mouse is over Carousel Panel)" TextWrapping="NoWrap" Margin="0,0,15,0" /> <Slider HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="3" Width="200" x:Name="speedSlider" Value="{Binding Speed, Mode=TwoWay}" Maximum="1" Minimum="0.1" /> <TextBlock HorizontalAlignment="Left"

Page 62: Design & Implementation of Dynamic Silverlight.pdf

Appendices VerticalAlignment="Top" Grid.Column="2" Grid.Row="3" Width="Auto" Height="Auto" Text="{Binding Speed}" FontStyle="Italic" TextWrapping="NoWrap" Margin="0,0,15,0" /> <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Row="4" Text="Scale for 'perspective'-increase or decrease apparent perspective for items in back" TextWrapping="NoWrap" Margin="0,0,15,0" Width="410" /> <Slider HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="4" Width="200" x:Name="scaleSlider" Value="{Binding ScalePerspective, Mode=TwoWay}" Maximum=".6" Minimum=".1" /> <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="2" Grid.Row="4" FontStyle="Italic" Width="Auto" Height="Auto" Text="{Binding ScalePerspective}" TextWrapping="NoWrap" Margin="0,0,15,0" /> </Grid> </Grid> </UserControl>

Page 63: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Appendix E

Flight_Schedule.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Flight_Schedule : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } Flight_schedule.XAML <UserControl x:Class="Schedule.MainPage" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="700"> <Grid x:Name="LayoutRoot" Background="White" Width="700" Height="500"> <TextBlock Text="Flight Schedule for period 5-11/04/2010" FontSize="16" TextAlignment="Center" TextWrapping="NoWrap" /> <TextBlock Text="" FontSize="20" TextAlignment="Center" Margin="0,37,0,-37" /> <data:DataGrid x:Name="grdDisplay" IsReadOnly="True" AutoGenerateColumns="False" RowBackground="Beige" AlternatingRowBackground="BlanchedAlmond" ColumnWidth="130" GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="Blue" HeadersVisibility="Column" Margin="21,37,27,12" > <data:DataGrid.Columns> <data:DataGridTextColumn Header="Departing Time" CanUserSort="False" Binding="{Binding DT}" /> <data:DataGridTextColumn Header="Departing" Binding="{Binding Departing}" /> <data:DataGridTextColumn Header="Arriving Time" Binding="{Binding AT}" /> <data:DataGridTextColumn Header="Arriving" Binding="{Binding Arriving}" /> <data:DataGridTextColumn Header="Day" Binding="{Binding Day}" /> </data:DataGrid.Columns> </data:DataGrid> </Grid> </UserControl>

Page 64: Design & Implementation of Dynamic Silverlight.pdf

Appendices

Appendix F

Contact_us.aspx <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Contactus.aspx.cs" Inherits="Contactus" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="width: 700px; height: 500px;"> <tr> <td> <div id="h" style=" text-align:left; font-size:x-large; font-family:Times New Roman; height: 315px;"> <p>For more Information contact us via Computer Engineering & Information Technology Dept Site:<br/> <a href="http://www.itswtech.org" target="_blank">www.itswtech.org</a><br/> or via Email:<br/> <a href="mailto:[email protected]">[email protected]</a><br/> <br/> </p> </div> &nbsp;</td> </tr> <tr> <td> &nbsp;</td> </tr> <tr> <td> &nbsp;</td> </tr> </table> </asp:Content> Contact_us.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Contactus : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } }

Page 65: Design & Implementation of Dynamic Silverlight.pdf

إقرار وتوقيع لجنة التقويم والمناقشة

الـ نفيذ الداينمكية في تقنية و تتصميم “نؤيد بانه قد تم قراءة هذا البحث المعنون باسم

Silverlight “في ”سمارة عماد نعمة“و ”مصطفى سعد مصطفى“ وقد قمنا بمناقشة الطلبة محتويات بحثهم المقدم الينا وكافة الملحقات التابعة له , وحسب وجهة نظر لجنة التقويم والمناقشة

فانه قد تم منح درجة كجزء من نيل متطلبات شهادة البكلوريوس في قسم هندسة الحاسبات وتكنولوجيا المعلومات.

التوقيع :

االسم : الدرجة العلمية : 2010التاريخ : / /

(مناقش)

التوقيع :االسم :

الدرجة العلمية : 2010التاريخ : / /

(رئيس)

التوقيع :االسم :

الدرجة العلمية : 2010التاريخ : / /

(مناقش)

التوقيع :االسم :

الدرجة العلمية : 2010التاريخ : / /

(مناقش)

مصدق من قبل الجامعة التكنولوجية للدراسات الجامعية في قسم هندسة الحاسبات وتكنولوجيا المعلومات

التوقيع : الشمري كريمالدكتور محموداالسم :

العنوان الوظيفي : رئيس قسم هندسة الحاسبات وتكنولوجيا المعلومات 2010التاريخ : / /

Page 66: Design & Implementation of Dynamic Silverlight.pdf

الخالصة

الخالصة

) يحتوي على كيان ASP.NETتتلخص فكرة هذا البحث في تصميم موقع باستخدام لغة (Silverlight ومن ثم جعل المتغيرات تنتقل من جهة الخادم الى الكيان. وهذا يعني اننا نفذنا قابلية .

) . Silverlightالحركة في الـ (

) ، حيث ان االخير ال يتوافق مع الـ Flash) تفوق بها تقنية الـ (Silverlightوهذه ميزة لتقنية الـ ()ASP.NET) الن الفالش يستخدم لغة الـ (Action Script وبيئة الـ (Flex) وهذا يعني تفوق .(

السلفراليت على الفالش بهذه الخاصية .

) من خالل محاكاة عرض بيانات حركة الطائرات للمطارات Silverlightتم اظهار ديناميكية الـ (العراقية .

وهذه المحاكاة تبين السيطرة على بيانات حركة الطيران في الطائرات العراقية واظهار بعض المتغيرات ذات العالقة بالرحلة مثل (المسافة والزمن).

يتبين من اعاله باننا نستطيع ان نجعل المتغيرات تنتقل من جهة الخادم الى جهة العميل . هذا . ASP.NET المستخدم فياالنتقال يالقي صعوبات في تقنية الفالش

Page 67: Design & Implementation of Dynamic Silverlight.pdf

وزارة التعليم العالي والبحث العلمي

الجامعة التكنولوجية

قسم هندسة الحاسبات وتكنولوجيا المعلومات

Silverlight الـنفيذ الداينمكية في تقنية و ت تصميم

هذا المشروع

يقدم الى قسم هندسة الحاسبات وتكنولوجيا المعلومات النجاز جزء من متطلبات لنيل درجة البكلوريوس

من قبل

مصطفى سعد مصطفى

سمارة عماد نعمة

بأشراف

مدرس مساعد سيف غسان محمد

2010 1431