Wei-Meng Lee - C# 2008 Programmer's Reference

Здесь есть возможность читать онлайн «Wei-Meng Lee - C# 2008 Programmer's Reference» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Город: Indianapolis, Год выпуска: 2009, ISBN: 2009, Издательство: Wiley Publishing, Inc., Жанр: Программирование, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

C# 2008 Programmer's Reference: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «C# 2008 Programmer's Reference»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

C# 2008 Programmers Reference provides a concise and thorough reference on all aspects of the language. Each chapter contains detailed code samples that provide a quick and easy way to understand the key concepts covered.

C# 2008 Programmer's Reference — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «C# 2008 Programmer's Reference», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Today, a new term has been coined: RIA — Rich Internet Application. To Microsoft, RIA really stands for Rich Interactive Application. And it was with that in mind that Microsoft recently launched a new technology/product called Silverlight. Previously known as Windows Presentation Foundation/Everywhere (WPF/E), Microsoft Silverlight is a browser plug- in that enables developers to host RIAs that feature animation and vector graphics, as well as video playback.

This chapter will help you get started with Silverlight and provides an opportunity for you to get a feel for how Silverlight development works.

The State of Silverlight

At the time of writing, there are two versions of Silverlight — 1.0 and 2 (previously known as version 1.1), the main difference being the support of .NET languages in version 2. For Silverlight version 1.0, you have to use JavaScript for writing your application logic. In version 2, in addition to JavaScript you can also use either C# or Visual Basic for your application logic, which is then executed by a version of the CLR built within the runtime.

At the time of writing, Silverlight 2 is in Beta 1.

The Silverlight runtimes currently support the following browsers:

□ Internet Explorer 6/7

□ Firefox 1.5/2.0

□ Safari 2.0

The following table compares the feature set of Silverlight 1.0 and Silverlight 2 Beta 1.

Features Silverlight 1.0 Silverlight 2 Beta 1
2D Vector Animation/Graphics X X
AJAX Support X X
Cross-Browser (Firefox, IE, Safari) X X
Cross-Platform (Windows, Mac) X X
Framework Languages(Visual Basic, Visual C#, IronRuby, Ironpython) X
HTML DOM Integration X X
HTTP Networking X X
Isolated Storage X
JavaScript Support X X
JSON, REST, SOAP/WS-*, POX, and RSS Web Services (as well as support for Sockets) X
Cross Domain Network Access X
LINQ to Objects X
Canvas Layout Support X X
StackPanel, Grid and Panel Layout Support X
Managed Control Framework X
Full suite of Controls (TextBox, RadioButton, Slider, Calendar, DatePicker, DataGrid, ListBox, and others) X
Deep Zoom Technology X
Managed HTML Bridge X
Managed Exception Handling X
Media — Content Protection X
Media — 720P High Definition (HD) Video X X
Media — Audio/Video Support (VC-1, WMV, WMA, MP3) X X
Media — Image Support (JPG, PNG) X X
Media Markers X X
Rich Core Framework (e.g. Generics, collections) X
Security Enforcement X
Silverlight ASP.NET Controls (asp:media, asp:xaml) X X
Type Safety Verification X
Windows Media Server Support X X
XAML Parser (based on WPF) X X
XMLReader/Writer X

Obtaining the Tools

To view Silverlight applications on your browser, you need to download one or all of the following runtimes:

□ Microsoft Silverlight 1.0 for Mac

□ Microsoft Silverlight 1.0 for Windows

□ Microsoft Silverlight 2 for Mac

□ Microsoft Silverlight 2 for Windows

When your web browser encounters a Silverlight application and there is no runtime installed, click on the Silverlight icon to download the required version of the runtime.

For developing Silverlight 1.0 applications, you need to download the Silverlight 1.0 SDK from www.microsoft.com/downloads.

For Silverlight 2 applications, the easiest way to get started is to use Visual Studio 2008. In addition to Visual Studio 2008, you also need to download Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 (www.microsoft.com/downloads), which will install the following components:

□ Silverlight 2 Beta 1 runtime

□ Silverlight 2 SDK Beta 1

□ KB949325 for Visual Studio 2008

□ Silverlight Tools Beta 1 for Visual Studio 2008

You can also purchase one or more of the following professional tools to help design your Silverlight applications:

Expression Blend 2— A professional design tool to create Silverlight applications.

Expression Media Encoder Preview Update— A feature that will be part of Microsoft Expression Media, a commercial digital asset management (DAM) cataloging program. It enables you to create and enhance video.

Expression Design— A professional illustration and graphic design tool to create Silverlight assets.

Architecture of Silverlight

Figure 19-1 shows the architecture for Silverlight 1.0 and 2.

Figure 191 Used by permission of Microsoft Corporation The Presentation Core - фото 371

Figure 19-1 Used by permission of Microsoft Corporation

The Presentation Core handles all the interactions with the user (through keyboard, mouse, and so on) as well as the rendering of UI elements such as media and controls. The XAML (Extensible Application Markup Language) component provides a parser for XAML markup (more about this in the next section), which is used as the UI of a Silverlight application. For Silverlight 1.0 applications, the primary means to program the application is JavaScript. In Silverlight 2, you can use either C# or VB.NET. During runtime, the application will be executed by the CLR Execution Engine. Notice that the various features available in the desktop version of the .NET Framework is also available for Silverlight — LINQ, WPF, WCF, BCL, and so forth.

Building a Silverlight UI Using XAML

A typical Silverlight project has four files:

□ An HTML file that hosts the Silverlight plug- in instance

□ A Silverlight.jsfile that contains all the necessary plumbing code required by Silverlight

□ An XAML file that contains the UI elements that make up a Silverlight application

□ A JavaScript file that contains the logic of your Silverlight application

The following sections show how to build a Silverlight application while presenting the basics of XAML, the UI language of Silverlight applications.

Creating a Bare-Bones Silverlight Application

Let's create a bare-bones Silverlight application by referencing all the necessary files required in a Silverlight application. First, remember to download the Silverlight 1.0 SDK from http://www.microsoft.com/downloads.

Once the SDK is downloaded, double-click on the Silverlightv1.0SDK.msifile to install the files onto your local computer (use the default directory).

Create a new folder in C:\ and name it Silverlight.

Copy the Silverlight.jsfile located in the C:\Program Files\Microsoft Silverlight 1.0 SDK\Tools\Silverlight.js\ folder into C:\Silverlight\.

Using Notepad, create the following HTML file; name it Default.html, and save it in the C:\Silverlight\ folder:

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «C# 2008 Programmer's Reference»

Представляем Вашему вниманию похожие книги на «C# 2008 Programmer's Reference» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «C# 2008 Programmer's Reference»

Обсуждение, отзывы о книге «C# 2008 Programmer's Reference» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x