검색결과 리스트
분류 전체보기 에 해당되는 글 656건
- 2007.07.27 An Overview of Visual Studio code name Orcas White Paper
- 2007.07.27 Expression Blend Tutorial 6 Image brush & visual brush
- 2007.07.26 RadControls에서 Silverlight관련 컨트롤이 출시되었습니다.
- 2007.07.26 Expression Blend Tutorial 5 버튼 만들기 (7)
- 2007.07.25 Web Services Enhancements (WSE) 2.0 for Microsoft .NET (1)
- 2007.07.25 Expression Blend Tutorial 4 레이아웃 디자인 (1)
- 2007.07.25 How to: Perform a File Upload with Silverlight
- 2007.07.24 Using Silverlight and RSS to Build a Hero Bar with ASP.NET (1)
- 2007.07.24 Expression Blend Tutorial 3 그라데이션의 활용
- 2007.07.23 [ASP.NET 다시보기 03 [4/3] 오류검출 및 바로잡기
-------------------------------------------------------
김영욱 Microsoft MVP 2006~2007
-------------------------------------------------------
Email: iwinkey@hotmail.com
Blog: winkey.tistory.com
Phone: 016-817-0063
www.winkey.pe.kr
www.vismuri.com
-------------------------------------------------------
댓글을 달아 주세요
나름 무겁긴 했지만 재미있는 기능들이 많고 나름 미려한 인터페이스를 제공했으며 기본적으로
AJAX를 지원해서 꽤 괜찮은 제품으로 기억하고 있던 제품이었습니다.
이번엔 그 회사에서 Silverlight 제품인 RadControls for Microsoft Silverlight 를 출시했습니다..
지금 다운로드가 가능한 베타 버전으로 제공되고 있는데
자세한 리뷰는 역시 주말에 잘 테스트해고 알려드리겠습니다.
http://www.telerik.com/products/silverlight/overview.aspx
-------------------------------------------------------
김영욱 Microsoft MVP 2006~2007
-------------------------------------------------------
Email: iwinkey@hotmail.com
Blog: winkey.tistory.com
Phone: 016-817-0063
www.winkey.pe.kr
www.vismuri.com
-------------------------------------------------------
댓글을 달아 주세요
프로퍼티를 설정하는 방법을 설명하고 있습니다.
-------------------------------------------------------
김영욱 Microsoft MVP 2006~2007
-------------------------------------------------------
Email: iwinkey@hotmail.com
Blog: winkey.tistory.com
Phone: 016-817-0063
www.winkey.pe.kr
www.vismuri.com
-------------------------------------------------------
댓글을 달아 주세요
-
김현정 2007.09.10 21:53 ADDR EDIT/DEL REPLY
안녕하세요 슈퍼루키님..^^
매번 세미나에서 강좌 듣기만 하다가 질문 한번 올려봅니다..
실버라이트 이제 시작한 초보인데요, 블렌드도 같이 해야겠다고 생각이 들어서, 동영상보면서 버튼부터 차근히 만들어 보려고 합니다..
궁금한 점이, 버튼 이미지를 카피해올때, 익스프레스 디자인에서 카피를 해서 붙여넣으시던데, 일반 그림판 같은곳에서 카피한 이미지는 붙여넣기가 안되던데, 원래 안 되는 건가요?
저는 안되길래 원하나 그려서 색즘넣고 버튼으로 해보려니 또 이번엔 버튼으로 변환이 안되더라구요..
이미지 버튼을 만드려면 꼭 익스프레스 디자인에서 이미지를 카피해서 읽어와야 하는지 궁금합니다.^^ -
오늘 기존에 만들어진 소스를 분석하다 보니 아래와 System.Web.Serivce2라는 Namespace를 찾고 있어서
검색하다 보니 WSE가 필요했던 것이였네요~ ^^
-----------------------------------------------------------------------------------------------
http://www.microsoft.com/downloads/details.aspx?FamilyId=FC5F06C5-821F-41D3-A4FE-6C7B56423841&displaylang=en
Web Services Enhancements (WSE) 2.0 for Microsoft .NET
| Quick Info | |
|
File Name: |
Microsoft WSE 2.0.msi |
|
Download Size: |
7258 KB |
|
Date Published: |
5/24/2004 |
|
Version: |
2.0 |
Overview
About WSE 2.0
WSE 2.0 simplifies the development and deployment of secure Web services by enabling developers and administrators to more easily apply security policies on Web services running on the .NET Framework. Using WSE, Web services communication can be signed and encrypted using Kerberos tickets, X.509 certificates, username/password credentials, and other custom binary and XML-based security tokens. In addition, an enhanced security model provides a policy-driven foundation for securing Web services across trust domains. WSE also supports the ability to establish a trust-issuing service for retrieval and validation of security tokens, as well as the ability to establish more efficient long-running secure communication via secure conversations.
New support for message-oriented programming enables asynchronous communication for Web services that involve long-lived operations, batch processing, peer to peer programs, or event driven application models. Web services that leverage WSE can now be hosted in multiple environments including ASP.NET, standalone executables, NT Services and can communicate over alternative transports including HTTP or TCP.
WSE provides a foundation for building applications based on Web services specifications published by Microsoft and industry partners including WS-Security (OASIS 2004 standard), WS-Policy, WS-SecurityPolicy, WS-Trust, WS-SecureConversation and WS-Addressing.
WSE 2.0 and WSE 1.0 SP1 can be installed side by side. If you had downloaded the 2.0 technology preview, uninstall it before installing WSE 2.0. Please review the product readme for more information about WSE 2.0, including API changes from WSE 1.0.
WSE 2.0 may be redistributed as part of your solution, provided that redistribution is done using the WSE 2.0 redistribution MSI, Microsoft WSE 2.0 Runtime.msi. This MSI is available as a separate download and is also included in the complete WSE 2.0 download.
WSE 2.0 is built for developers using Visual Studio .NET 2003 and the .NET Framework 1.1. The WSE support life-cycle policy is in line with the .NET Framework support life-cycle policy. For additional information on this support policy, please check http://support.microsoft.com/common/international.aspx. http://msdn.microsoft.com/webservices/building/wse/WhatsNew/
What's New and Different in WSE 2.0?
Web Services Enhancements for Microsoft .NET version 2.0 includes a number of enhancements over earlier versions of WSE to more easily apply security policy, establish long-running secure conversations, and work in multiple hosted environments. Some of these enhancements, such as the WSE 2.0 support for the newly-approved Oasis standard version of WS-Security, mean WSE 2.0 cannot exchange SOAP messages with WSE 1.0. The good news is that you can use the WSE 2.0 assemblies in the same applications as your WSE 1.0 assemblies so that a single application can communicate with both WSE 1.0 and WSE 2.0 Web services. An overview of other features and version issues is provided below:
New and Enhanced Features
This section describes the new and enhanced features included in the WSE 2.0.
Policy
WSE version 2.0 enables developers to use configuration files to specify requirements for receiving and sending messages. Previously, an application receiving a SOAP message had to contain code to verify message-receiving requirements, such as whether the SOAP message was digitally signed or encrypted. Likewise, the developer of the application sending the SOAP message had to know the receiver's message requirements and add code to the sending application. Now those requirements, known as policy assertions, can be expressed in a configuration file. When policy assertions are configured, WSE runtime checks incoming or outgoing SOAP messages to determine whether they comply with the policy assertions; when they do not, WSE runtime returns a SOAP fault. WSE has a set of predefined policy assertions, such as the requirement that the body of the SOAP message be signed with an X.509 certificate. In addition, the policy system can be extended to include custom policy assertions.
WS-Trust and Security Context Tokens
WSE's support of the WS-Trust and WS-SecureConversation specifications provides the capability to programmatically request a security token using a SOAP message, and that token can be used for a series of SOAP messages between a SOAP message sender and a target Web service. WSE allows you to build a security token service or configure one that issues security context tokens. When configured to issue security context tokens, a SOAP message sender can use the token to sign and/or encrypt a series of SOAP messages, known as a conversation, between a SOAP message sender and the target Web service.
Kerberos Security Tokens
WSE supports the use of security tokens based on Kerberos tickets. Kerberos tickets can be used to digitally sign and encrypt SOAP messages, along with authorizing access to a Web service based on a Kerberos security token.
Role-based Security Using Security Tokens
WSE supports role-based authorization for SOAP messages by constructing a principal from a security token in the SOAP message, such as the one used to digitally sign the SOAP message. Because there may be multiple security tokens in a SOAP message, WSE allows the application to configure which security token is used for authentication and authorization. When this security token is a user name and password or Kerberos ticket, the contents of the security token are used to authenticate against a Windows account. If the credentials are authenticated, a Windows principal is created and assigned to the Principal property of the security token used to sign the SOAP message. Using that Principal property, code in a Web service method can decide whether a given role is authorized to execute all or portions of the Web service method. Alternatively, role-based security can be declaratively set using policy.
Signing and Encrypting Security Tokens
When a security token is added to a SOAP message, it is added to the SOAP message in the form of an XML element in the WS-Security SOAP header. That XML element can now be digitally signed or encrypted. This can be very useful when the security token is a UsernameToken, which is based upon a user name and password — especially if the password is sent in plaintext. And when you use role-based security with a UsernameToken, the password must be sent in plaintext. Therefore, encrypting the UsernameToken containing a plaintext password can make it more difficult for an intermediary to steal a user's password.
SOAP Messaging
With SOAP messaging, WSE supports a flexible and lightweight mechanism for sending and receiving SOAP messages. This mechanism allows applications to switch between the TCP and HTTP transport protocols relatively easily. When the TCP transport protocol is used, the SOAP messages can be sent and received without using a Web server. A Web server, which only handles HTTP requests, operates based upon the HTTP specification requirement that every HTTP request receive an HTTP response. This request/response model is not always necessary when sending messages; a SOAP message sender might need to send several messages and may not need or expect any return SOAP messages. The SOAP messaging in WSE accommodates this type of messaging, while still allowing developers to take advantage of the other features of WSE, such as digital signature and encryption support.
Visual Basic .NET Sample Code
The QuickStarts and sample code throughout the documentation are provided in both Visual Basic and C#.
XML Security Token Support
WSE 2.0 now provides support for XML security tokens, such as XrML and SAML security tokens. To use XML security tokens, you must create and configure a custom XML security token.
Version Compatibility
Web Services Enhancements attempts to maintain a degree of backward compatibility between versions. However, changes to WSE that help improve security, correctness, or functionality require rewriting portions of code when upgrading to the latest version of WSE.
The following is a list of areas containing breaking changes between WSE 1.0 and WSE 2.0
SOAP Messages Do Not Interoperate Between WSE 1.0 and 2.0
Messages sent between applications running WSE 1.0 and 2.0 generate a SOAP fault. A SOAP fault is generated because WSE 1.0 and 2.0 implement different Web services architecture specifications. Specifically, WSE 1.0 implements the WS-Routing and WS-Security specifications, whereas WSE 2.0 implements the WS-Addressing and OASIS WS-Security specifications.
Running Multiple Versions of WSE Simultaneously
Multiple versions of WSE can be installed and run on the same machine simultaneously. However, a Web service running on that machine can use only one of the versions. A single Web service client can interact with Web services running WSE 1.0 and with Web services running WSE 2.0. However, the client must use fully qualified names in the code to specify which version of WSE is being used. For example, the client could not specify SoapContext but would have to specify either Microsoft.Web.Services.SoapContext or Microsoft.Web.Services2.SoapContext.
Getting a SoapContext from Within a Web Service
To get a SoapContext from within a Web service in WSE 2.0, use the static (Shared in Visual Basic) Current property of the RequestSoapContext or ResponseSoapContext class for a SOAP request or SOAP response, respectively. For WSE version 1.0, the static (Shared) RequestSoapContext and ResponseSoapContext methods of the HttpSoapContext are used to get a SoapContext from within a Web service.
IPasswordProvider Interface Is Obsolete
You no longer have to build a class that implements the IPasswordProvider interface and configure that class when a Windows user account is used with a UsernameToken. WSE now supports Windows authentication for a UsernameToken. When Windows accounts are sent in the UsernameToken, a class does not have to be built and configured. However, when a Windows user account is not used with a UsernameToken, a class deriving from the SecurityTokenManager class must be built and configured.
DecryptionKeyProvider Class Is Obsolete
Shared-secret encryption (also known as symmetric encryption) is now done using a security token based on a symmetric key instead of just the symmetric key alone. Security context tokens, which are issued from security token services, are based on a symmetric key that can be used to encrypt SOAP messages.
Using Custom Binary Security Tokens in WSE 2.0
Custom binary security tokens built using WSE 1.0 require modification to be used in WSE 2.0.
가능합니다. 컨트롤의 리사이징이나 혹은 상호 배치등이 별다른 코딩없이 자연스럽게 가능합니다.
-------------------------------------------------------
김영욱 Microsoft MVP 2006~2007
-------------------------------------------------------
Email: iwinkey@hotmail.com
Blog: winkey.tistory.com
Phone: 016-817-0063
www.winkey.pe.kr
www.vismuri.com
-------------------------------------------------------
이 아티클은 Silverlight에서 파일을 업로드 하는 예제를 설명하고 있다.
아직 자세히 살펴보지는 않았지만. 파일 업로드를 웹 서비스를 이용하는 방식으로 사용한다면
아무래도 범용성에 많은 제약이 있을 것 같다.
원문 http://www.silverlight.net/QuickStarts/Other/Upload.aspx
-----------------------------------------------------------------------------------------
Introduction
This QuickStart sample demonstrates how to upload the contents of an image file using the Microsoft .NET Framework for Silverlight. It includes an example of how to call a Web service with the HTTP POST method using the .NET Framework for Silverlight.
Working with this capability in your Silverlight-based application involves the following tasks:
-
Retrieving the contents of an image file from the user by using the OpenFileDialog object.
-
Calling a Web service using the BrowserHttpWebRequest and HttpWebResponse objects.
Prerequisites (available from the Silverlight download site):
-
Microsoft Silverlight 1.1 Alpha.
-
Microsoft Visual Studio Code Name "Orcas" Beta 1.
-
Microsoft Silverlight Tools Alpha for Visual Studio Code Name "Orcas" Beta 1.
-
An ASP.NET Web site.
-
A Silverlight project. See How to: Create a Silverlight Project for instructions.
Retrieving a File Using the OpenFileDialog Object
For security reasons, you cannot access the file system directly from your browser code. You can store and retrieve files for your application by using isolated storage. (For more information, see How to: Use Isolated Storage with .NET Framework Silverlight.) However, in cases where you need the user to supply a file for your application, you can use the OpenFileDialog object to present the user with a dialog box where they can specify a file from the file system that your application can access. By default, your code has read-only access to the file, but the dialog box provides an option for users to specify write access as well.
To enable a user to supply a file for your application, create an instance of the OpenFileDialog object, set object properties such as the Title and Filter properties as desired, and call the ShowDialog method. If the user selects a file (or files) and clicks OK, the ShowDialog method will return a DialogResult value of OK, and you can access the selected file or files. You access a selected file by using the SelectedFile property of the OpenFileDialog object. (If you have specified the EnableMultipleSelection property of the OpenFileDialog object as true, you can access multiple files by using the SelectedFiles property.) You use the OpenText or OpenRead methods of the SelectedFile property to access a stream of the file contents.
The following code example shows the use of the OpenFileDialog object to retrieve an image file from the user. Because image files are binary files, the OpenRead method is used to access a stream of the file contents. The file contents are then encoded as a Base64 string and uploaded to the Web server with a Web service call.
CS
private void OnUpload(object sender, EventArgs e)
{
// Rehide the status canvas with each request.
StatusCanvas.Visibility = Visibility.Hidden;
// Prompt the user to select an image file.
OpenFileDialog ofd = new OpenFileDialog();
ofd.EnableMultipleSelection = false;
ofd.Filter = "Image files (*.jpg;*.png)|*.jpg;*.png";
ofd.Title = "Select an image to upload";
if (ofd.ShowDialog() == DialogResult.OK)
{
// Read the contents of the file.
string fileName = ofd.SelectedFile.Name;
Stream f = ofd.SelectedFile.OpenRead();
byte[] fileBytes = new byte[f.Length];
int byteCount = f.Read(fileBytes, 0, (int)f.Length);
string fileContents = Convert.ToBase64String(fileBytes);
// Post the file contents to the web service.
UploadImage(fileName, fileContents);
// Print the status of the upload.
ResponseMessage.Foreground = new SolidColorBrush(Color.FromRgb(0, 0, 255));
StatusCanvas.Visibility = Visibility.Visible;
//Display the uploaded image.
UploadedImage.Source = new Uri("GetImage.aspx?fileName=" + fileName, UriKind.Relative);
}
}
VB
Private Sub OnUpload(ByVal o As Object, ByVal e As EventArgs)
' Rehide the status canvas with each request.
StatusCanvas.Visibility = Visibility.Hidden
' Prompt the user to select an image file.
Dim ofd As New OpenFileDialog()
ofd.EnableMultipleSelection = False
ofd.Filter = "Image files (*.jpg;*.png)|*.jpg;*.png"
ofd.Title = "Select an image to upload"
If ofd.ShowDialog() = DialogResult.OK Then
' Read the contents of the file.
Dim fileName As String = ofd.SelectedFile.Name
Dim f As Stream = ofd.SelectedFile.OpenRead()
Dim fileBytes(f.Length) As Byte
Dim byteCount As Integer = f.Read(fileBytes, 0, CInt(f.Length))
Dim fileContents As String = Convert.ToBase64String(fileBytes)
' Post the file contents to the web service.
UploadImage(fileName, fileContents)
' Print the status of the upload.
ResponseMessage.Foreground = New SolidColorBrush(Color.FromRgb(0, 0, 255))
StatusCanvas.Visibility = Visibility.Visible
'Display the uploaded image.
UploadedImage.Source = _
New Uri("GetImage.aspx?fileName=" & fileName, UriKind.Relative)
End If
End Sub
Calling a Web Service to Upload an Image File
You can call a Web service from Silverlight code by using HTTP POST. You can use the BrowserHttpWebRequest object to make an HTTP request from the browser. To include the contents of an image file in an HTTP POST request, you can encode the binary image file contents as Base64 and include them in the body of the HTTP POST request. In this example, the body of the HTTP POST request is URL-encoded (for example, var1=value1&var2=value2&var3=value3). You can include the name of the image file and the file contents as two URL-encoded variables in the form of fileName=<image file name>&fileContents=<encoded file contents>, as shown in the following example.
CS
public void Page_Loaded(object o, EventArgs e)
{
// Required to initialize variables
InitializeComponent();
StatusCanvas.Visibility = Visibility.Hidden;
UploadButton.MouseLeftButtonDown += OnUpload;
}
VB
Public Sub Page_Loaded(ByVal o As Object, ByVal e As EventArgs)
' Required to initialize variables
InitializeComponent()
StatusCanvas.Visibility = Visibility.Hidden
AddHandler UploadButton.MouseLeftButtonDown, AddressOf OnUpload
End Sub
You may need to enable the use of the HTTP POST method to call Web services in your Web application. To enable HTTP POST calls to Web services for your application, add HttpPost to the protocols section of the webServices configuration section in the system.web configuration for your application as shown in the following code example.
<system.web>
<webServices>
<protocols>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>For more information about how to call a Web service from Silverlight code, see How To: Use a Proxy to Call an ASP.NET Web Service from Silverlight.
Compiling the Code
You can create a copy of the example to run locally by using the following procedures.
Creating an ASP.NET Web Service
This QuickStart sample uses a Web service to receive the uploaded file contents. For security reasons, cross-domain browser calls are not allowed. That is, the .NET Framework for Silverlight code that runs in the browser that calls the Web service must run in a Web page that is served from the same domain as the Web service. As a result, you must first create a Web site to host both the Silverlight client page and the Web service.
The Web service created in this procedure takes the name of a folder that contains image files as input, and returns a list of the image file names. This is required because the Silverlight client code runs in the browser and does not have access to the file system on the Web server.
To create an ASP.NET Web service
-
In Visual Studio, on the File menu, click New Web Site.
-
In the Visual Studio Installed Templates panel, click ASP.NET Web Service.
-
In the Location list, click File System. Specify a file path for your Web site, and then click OK.
-or-
You can click HTTP and create a new Web site on an Internet Information Services (IIS) Web server to host this sample.
Visual Studio will create an ASP.NET Web site with a default Web service.
-
Double-click the Service.asmx file to edit it. Change Class="Service" to Class="SampleUploadServiceVB" for Visual Basic or Class="SampleUploadServiceCS" for C#. Save the changes and close the file.
-
In the App_Code folder, double-click the Service.cs or Service.vb file, depending on the programming language (Visual Basic or C#) you chose for your sample. Replace the contents of the file with the following code for your programming language.
App_Code
using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Caching; using System.IO; [WebService(Namespace = "http://tempuri.org/")] public class SampleUploadServiceCS : System.Web.Services.WebService { public SampleUploadServiceCS () { } [WebMethod] public void UploadImage(string fileName, string fileContents) { string imagePath = fileName; HttpContext.Current.Cache.Add(fileName, fileContents, null, DateTime.Now.AddSeconds(30), TimeSpan.Zero, CacheItemPriority.High, null); } }App_Code
Imports System Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Web.Caching Imports System.IO <WebService(Namespace:="http:'tempuri.org/")> _ Public Class SampleUploadServiceVB Inherits WebService Public Sub New() End Sub <WebMethod()> _ Public Sub UploadImage(ByVal fileName As String, ByVal fileContents As String) Dim imagePath As String = fileName HttpContext.Current.Cache.Add(fileName, fileContents, _ Nothing, DateTime.Now.AddSeconds(30), TimeSpan.Zero, _ CacheItemPriority.High, Nothing) End Sub End Class -
Save the changes and close the file.
This sample does not write any files to the Web server file system. The Web service places the encoded file contents in the Cache for only 30 seconds so that the sample application can request them after they have been uploaded. To serve up the contents of the uploaded image file from the Cache, this sample uses an ASP.NET page that writes out the file stream using the BinaryWrite method.
-
Right-click the Web site project, and click Add New Item.
-
Click Web Form. In the Name field, type GetImage.aspx. In the Language list, select the language that you prefer.
-
Double-click the GetImage.aspx file to edit its contents. Replace the default contents with the following code for your preferred language.
VB
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="GetImage.aspx.vb" Inherits="GetImage" %>
-
Save the changes and close the file.
-
Double-click the GetImage.aspx.vb file for Visual Basic or the GetImage.aspx.cs file for C# to edit its contents. Replace the default contents with the following code for your preferred language.
CS
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; using System.Text; public partial class GetImage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string fileName = Request.QueryString["fileName"]; string[] tmp = fileName.Split('.'); string extension = tmp[tmp.Length-1]; switch (extension) { case "jpg": Response.ContentType = "image/jpeg"; break; case "png": Response.ContentType = "image/png"; break; default: Response.ContentType = "image/jpg"; break; } string fileContents = (string)Cache[fileName]; Response.BinaryWrite(Convert.FromBase64String(fileContents)); } }VB
Imports System Imports System.Data Imports System.Configuration Imports System.Collections Imports System.Web Imports System.Web.Security Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls.WebParts Imports System.Web.UI.HtmlControls Imports System.IO Imports System.Text Partial Public Class GetImage Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim fileName As String = Request.QueryString("fileName") Dim tmp As String() = fileName.Split(".") Dim extension As String = tmp(tmp.Length - 1) Select Case extension Case "jpg" Response.ContentType = "image/jpeg" Case "png" Response.ContentType = "image/png" Case Else Response.ContentType = "image/jpg" End Select Dim fileContents As String = Cache(fileName) Response.BinaryWrite(Convert.FromBase64String(fileContents)) End Sub End Class -
Save the changes and close the file.
Creating a Silverlight Project
Silverlight client code is compiled into an assembly that is downloaded to the browser. As a result, you can create a separate project for your Silverlight code, build that project into an assembly, and copy that assembly to your Web site. You will also copy a XAML file that references the assembly, and a client file (in this case, an HTML file) to load the XAML Canvas object specified in your XAML file.
To create a Silverlight project
-
Leave your ASP.NET Web site project open. In Visual Studio, on the File menu, click Add, then click New Project.
-
In the Visual Studio Installed Templates panel, click Silverlight Project.
-
In the Name box, type a name for the project. Type ImageUploadVB for Visual Basic or ImageUploadCS for C#, and then click OK.
The Visual Studio Solution Explorer will show both the Web site created previously, and your new Silverlight project. The Silverlight project will contain an HTML file named TestPage.html, a XAML file named Page.xaml, and a C# or Visual Basic file that contains a partial class that is associated with the XAML Canvas object specified in the Page.xaml file.
-
Right-click the TestPage.html file, and click Rename. Change the file name to Default.html.
-
Double-click the Default.html file to edit its contents. Change the title tag to Image Upload Sample. Save the changes and close the file.
-
Double-click the Page.xaml file to edit its contents. Replace the default contents with the following XAML code for your chosen programming language. Note that the only difference between the XAML files for the different languages is the name of the class and compiled assembly identified in the x:Class attribute of the parent XAML Canvas.
CS
<Canvas x:Name="parentCanvas" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Page_Loaded" x:Class="ImageUploadCS.Page;assembly=ClientBin/ImageUploadCS.dll" Width="800" Height="600" Background="White" > <Canvas x:Name="ButtonCanvas" Background="Navy"> <TextBlock x:Name="UploadButton" FontFamily="Verdana" Width="400" Height="30" Text="Click Here to upload an image." /> </Canvas> <Canvas x:Name="StatusCanvas" Background="Green"> <TextBlock x:Name="ResponseMessage" FontFamily="Verdana" Foreground="Green" Canvas.Top="30" Width="400" Height="30" Text="Image Uploaded." /> </Canvas> <Image x:Name="UploadedImage" Canvas.Top="60" /> </Canvas>VB
<Canvas x:Name="parentCanvas" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Page_Loaded" x:Class="ImageUploadVB.Page;assembly=ClientBin/ImageUploadVB.dll" Width="800" Height="600" Background="White" > <Canvas x:Name="ButtonCanvas" Background="Navy"> <TextBlock x:Name="UploadButton" FontFamily="Verdana" Width="400" Height="30" Text="Click Here to upload an image." /> </Canvas> <Canvas x:Name="StatusCanvas" Background="Green"> <TextBlock x:Name="ResponseMessage" FontFamily="Verdana" Foreground="Green" Canvas.Top="30" Width="400" Height="30" Text="Image Uploaded." /> </Canvas> <Image x:Name="UploadedImage" Canvas.Top="60" /> </Canvas> -
Save the changes and close the file.
-
Double-click the Page.xaml.cs or Page.xaml.vb file to edit its contents. Replace the default contents with the following code for your chosen programming language.
CS
using System; using System.Linq; using System.Xml; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using System.Text; using System.IO; using System.Windows.Browser; using System.Windows.Browser.Net; using System.Net; namespace ImageUploadCS { public partial class Page : Canvas { public void Page_Loaded(object o, EventArgs e) { // Required to initialize variables InitializeComponent(); StatusCanvas.Visibility = Visibility.Hidden; UploadButton.MouseLeftButtonDown += OnUpload; } private void UploadImage(string fileName, string fileContents) { // Create an HTTP request with the path to the web service // to post the image file to. Uri uploadService = new Uri("Service.asmx/UploadImage", UriKind.Relative); BrowserHttpWebRequest _request = new BrowserHttpWebRequest(uploadService); _request.Method = "POST"; _request.ContentType = "application/x-www-form-urlencoded"; // Add the file contents to the body of the HTTP request. string formBody = "fileName=" + HttpUtility.UrlEncode(fileName) + "&" + "fileContents=" + HttpUtility.UrlEncode(fileContents); UTF8Encoding encoding = new UTF8Encoding(); byte[] formBytes = encoding.GetBytes(formBody); Stream body = _request.GetRequestStream(); body.Write(formBytes, 0, formBytes.Length); // Send the HTTP request. HttpWebResponse response = (HttpWebResponse)_request.GetResponse(); body.Close(); } private void OnUpload(object sender, EventArgs e) { // Rehide the status canvas with each request. StatusCanvas.Visibility = Visibility.Hidden; // Prompt the user to select an image file. OpenFileDialog ofd = new OpenFileDialog(); ofd.EnableMultipleSelection = false; ofd.Filter = "Image files (*.jpg;*.png)|*.jpg;*.png"; ofd.Title = "Select an image to upload"; if (ofd.ShowDialog() == DialogResult.OK) { // Read the contents of the file. string fileName = ofd.SelectedFile.Name; Stream f = ofd.SelectedFile.OpenRead(); byte[] fileBytes = new byte[f.Length]; int byteCount = f.Read(fileBytes, 0, (int)f.Length); string fileContents = Convert.ToBase64String(fileBytes); // Post the file contents to the web service. UploadImage(fileName, fileContents); // Print the status of the upload. ResponseMessage.Foreground = new SolidColorBrush(Color.FromRgb(0, 0, 255)); StatusCanvas.Visibility = Visibility.Visible; //Display the uploaded image. UploadedImage.Source = new Uri("GetImage.aspx?fileName=" + fileName, UriKind.Relative); } } } }VB
Imports System Imports System.Linq Imports System.Xml Imports System.Windows Imports System.Windows.Controls Imports System.Windows.Documents Imports System.Windows.Ink Imports System.Windows.Input Imports System.Windows.Media Imports System.Windows.Media.Animation Imports System.Windows.Shapes Imports System.Text Imports System.IO Imports System.Windows.Browser Imports System.Windows.Browser.Net Imports System.Net Partial Public Class Page Inherits Canvas Public Sub Page_Loaded(ByVal o As Object, ByVal e As EventArgs) ' Required to initialize variables InitializeComponent() StatusCanvas.Visibility = Visibility.Hidden AddHandler UploadButton.MouseLeftButtonDown, AddressOf OnUpload End Sub Private Sub UploadImage(ByVal fileName As String, ByVal fileContents As String) ' Create an HTTP request with the path to the web service ' to post the image file to. Dim uploadService As New Uri("Service.asmx/UploadImage", UriKind.Relative) Dim _request As New BrowserHttpWebRequest(uploadService) _request.Method = "POST" _request.ContentType = "application/x-www-form-urlencoded" ' Add the file contents to the body of the HTTP request. Dim formBody As String = "fileName=" & HttpUtility.UrlEncode(fileName) & "&" & _ "fileContents=" & HttpUtility.UrlEncode(fileContents) Dim encoding As New UTF8Encoding() Dim formBytes As Byte() = Encoding.GetBytes(formBody) Dim body As Stream = _request.GetRequestStream() body.Write(formBytes, 0, formBytes.Length) ' Send the HTTP request. Dim response As HttpWebResponse = CType(_request.GetResponse(), HttpWebResponse) body.Close() End Sub Private Sub OnUpload(ByVal o As Object, ByVal e As EventArgs) ' Rehide the status canvas with each request. StatusCanvas.Visibility = Visibility.Hidden ' Prompt the user to select an image file. Dim ofd As New OpenFileDialog() ofd.EnableMultipleSelection = False ofd.Filter = "Image files (*.jpg;*.png)|*.jpg;*.png" ofd.Title = "Select an image to upload" If ofd.ShowDialog() = DialogResult.OK Then ' Read the contents of the file. Dim fileName As String = ofd.SelectedFile.Name Dim f As Stream = ofd.SelectedFile.OpenRead() Dim fileBytes(f.Length) As Byte Dim byteCount As Integer = f.Read(fileBytes, 0, CInt(f.Length)) Dim fileContents As String = Convert.ToBase64String(fileBytes) ' Post the file contents to the web service. UploadImage(fileName, fileContents) ' Print the status of the upload. ResponseMessage.Foreground = New SolidColorBrush(Color.FromRgb(0, 0, 255)) StatusCanvas.Visibility = Visibility.Visible 'Display the uploaded image. UploadedImage.Source = _ New Uri("GetImage.aspx?fileName=" & fileName, UriKind.Relative) End If End Sub End Class -
Save the changes and close the file.
-
Right-click the project file for your Silverlight project, and click Build. By default, a Silverlight project is configured to place the compiled assembly in the ClientBin folder of the Silverlight project. Select the Silverlight project. On the Project menu, click Show All Files to make the ClientBin folder visible.
Copying the Silverlight Assembly and Files to the Web Site
At this point, your Silverlight project is ready to run and simply needs to be copied to your Web site. You need to copy the client HTML file, the XAML file, and the compiled assembly to your Web site to run your Silverlight example.
To copy the Silverlight assembly and files to the Web site
-
In the Solution Explorer, in your Silverlight project, right-click the Page.xaml file, and then click Copy.
-
In the Solution Explorer, right-click the Web site project, and then click Paste. (The Page.xaml.cs or Page.xaml.vb file will also be copied. You can delete this copy.)
-
In the Solution Explorer, in your Silverlight project, right-click the Default.html file, and then click Copy.
-
In the Solution Explorer, right-click the Web site project, and then click Paste (a file named TestPage.html.js will also be copied).
-
In the Solution Explorer, in your Silverlight project, right-click the Silverlight.js file, and then click Copy.
-
In the Solution Explorer, right-click the Web site project, and then click Paste.
-
Right-click the Web site project, and click New Folder. Name the new folder ClientBin.
-
In the Solution Explorer, click the project file for your Silverlight project. Click the Project menu, and then click Show All Files. Among the now viewable files and folders you will see a ClientBin folder. Expand this folder, right-click the ImageUploadVB.dll or ImageUploadCS.dll file, and then click Copy.
-
In the Solution Explorer, right-click the ClientBin folder in the Web site project, and then click Paste.
-
Right-click the Web site project, and click New Folder. Name the new folder images.
-
In the Web site project, right-click the Default.html file, and then click View in Browser to run the sample.
댓글을 달아 주세요
이번 주말에 찬찬히 살펴보아야 겠다.
Laurence Moroney
Updated: May 2007
Applies to:
Silverlight
ASP.NET
Summary: Learn how to use Microsoft Silverlight and RSS through ASP.NET to create a simple hero bar that is easily customizable and regenerated. (11 printed pages)
Contents
Introduction
Creating the XAML Template.
Using RSS
Building an ASP.NET Application to Generate XAML from the RSS Document
Managing the URLs
Rendering the Hero Banner in Silverlight
Introduction
We have all seen hero bars on our favorite websites—you know, the banner at the top of the site that rotates around new content and provides direct linkage to it? Did you know that it is easy to create a hero bar with Silverlight? Did you also know that it is just as easy to drive that hero bar content using RSS?
In this article, you'll see how to create a simple one that is easily customizable and can be regenerated simply by editing an RSS document. As such, you can have a hero bar that highlights new blog entries (where your blog is syndicated via RSS), and all you have to do to update the bar is create a new blog entry!
Figure 1 shows an example of a hero bar in action.
.gif)
Figure 1. Viewing a hero bar in Internet Explorer
This article will guide you through the following steps in order to construct a hero bar:
- You will create an XAML template that contains one item and any necessary resources, such as animations (Creating the XAML Template.).
- You will create an ASP.NET application that reads an RSS file and generates XAML using the template in Step 1 (Building an ASP.NET Application to Generate XAML from the RSS Document).
- You will create a second ASP.NET application that reads an RSS file and generates JavaScript code containing the URLs (Managing the URLs).
- You will create an HTML page that contains the Silverlight control, sourcing it from the ASP.NET application in Step 2 and from the JavaScript generator in Step 3 (Rendering the Hero Banner in Silverlight).
Creating the XAML Template
The hero bar in Figure 1 is a 960 × 150 pixel bar containing an image, a headline element with a larger font, and a details element with a smaller font. In XAML, these are collected together into a canvas such as the following:
<Canvas Width="960" Height="150" x:Name="cnvItem0" Opacity="0" MouseLeftButtonDown="javascript:DoClick">
<Canvas.Background>
<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="#FF310909" Offset="0"/>
<GradientStop Color="#FFAE0000" Offset="1"/>
</LinearGradientBrush>
</Canvas.Background>
<Image x:Name="img0" Width="344" Height="136"
Canvas.Left="8" Canvas.Top="8" Source=""/>
<TextBlock x:Name="hdln0" Width="576" Height="40"
Canvas.Left="376" Canvas.Top="8"
FontFamily="Tahoma" FontSize="24"
FontWeight="Normal" Foreground="#FFFFFFFF"
Text="Headline Text 1" TextWrapping="Wrap"/>
<TextBlock x:Name="detl0" Width="576"
Height="96" Canvas.Left="376"
Canvas.Top="48" FontFamily="Tahoma"
FontSize="14" FontWeight="Normal"
Foreground="#FFFFFFFF"
Text="Text Details 1 Describing the stuff inside the hero bar. Clicking anywhere on the bar should take us to the bar details page."
TextWrapping="Wrap"/>
</Canvas>Of course, you can use any XAML design that you like, but do take note of the element names. These names are used by the ASP.NET code to fish out the nodes using XPath.
In addition to this, you will likely want an animation that manages the transition between different banners. In the following example, the animation used is a fade in opacity from one element to the next:
<Storyboard x:Name="FadeIn" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames x:Name="Step0"
Storyboard.TargetName="cnvItem0"
Storyboard.TargetProperty="(UIElement.Opacity)" >
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:05" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:06" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>This example uses a DoubleAnimationUsingKeyFrames that fades the opacity of the item from 0 (invisible) to 1 (fully visible) over five seconds, and back to 0 over 1 further second. This will be used as the template for each animation. For example, if you have five elements on your hero bar, you will have five of these storyboards set up—one for each element.
Using RSS
The RSS specification defines an <item> node, which can contain a title, a link, a description, and a resource element such as a graphic or a video in an <enclosure> tag. This example uses images, but there is no reason why you couldn't use a video hero bar by specifying videos in the <enclosure> and using <MediaElement> instead of <Image> within your XAML.
The following is an example RSS document that contains links to Silverlight samples on Channel9, which you can update with any links you like.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0"><channel>
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>Red v Blue, starring Scott Guthrie</title>
<link>http://channel9.msdn.com/playground/wpfe/rvbplayer/</link>
<description>ScottGu in Red v Blue. Can an executive shoot a gun?
Can he do it again?</description>
<enclosure
url="http://channel9.msdn.com/playground/wpfe/images/rvbplayer.jpg"
length="10659" type="image/jpeg" />
</item>
<item>
<title>Updated Grand Piano showing Keyboard input!</title>
<link>http://channel9.msdn.com/playground/wpfe/grandpiano/</link>
<description>Your chance to be the concert pianist
you always wanted to be...</description>
<enclosure
url="http://channel9.msdn.com/playground/wpfe/images/grandpiano.jpg"
length="6809" type="image/jpeg" />
</item>
<item>
<title>An online WPFE Pad</title>
<link>http://channel9.msdn.com/playground/wpfe/wpfepad/</link>
<description>A great little online notepad that allows
you to write and test your XAML</description>
<enclosure
url="http://channel9.msdn.com/playground/wpfe/images/wpfepad.jpg"
length="10938" type="image/jpeg" />
</item>
</channel>
</rss>If you are using RSS that is generated from your blog (for example), make sure that these nodes are supported. If they are not, you will need to amend your ASP.NET code in order to handle the structure of your RSS document.
Building an ASP.NET Application to Generate XAML from the RSS Document
The first thing you'll want to do is override the HTML output from the ASPX page—you will just want the ASPX page to write out XAML. The most straightforward way is to delete all markup on the ASPX page, except for the first line. For example, if you named your page "GenerateXaml.aspx," your page should have a line like the following:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GenerateXaml.aspx.cs" Inherits="_Default" %>
You would then want to use code like the following on your Page_Load event handler:
protected void Page_Load(object sender, EventArgs e)
{
String strRSSDoc = Request.Params["feed"];
if (strRSSDoc == null)
strRSSDoc = Server.MapPath("rssfeed.xml");
WebClient rssClient = new WebClient();
Stream data = rssClient.OpenRead(strRSSDoc);
StreamReader reader = new StreamReader(data);
String sBuffer = reader.ReadToEnd();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(sBuffer);
XmlDocument xmlXaml = GenerateXaml(xmlDoc);
Response.ContentType = "text/xml";
Response.Write(xmlXaml.OuterXml);
}Because this code takes a feed parameter, you can pass in the URI of an RSS document by calling http://server/GenerateXaml.aspx?feed=URI. Or if you omit this parameter, it will read the data from a file called rssfeed.xml in the same directory as the ASPX page.
It then reads this RSS file into an XAML document and calls the GenerateXaml helper function to create a new XmlDocument called "xmlXaml." It then writes the "xmlXaml" contents out to the response stream.
The workhorse of this application is the aforementioned GenerateXaml helper function. It's a big function, so we'll go through it step by step.
The first thing you'll need to do is to create the following:
XmlDocument xmlXaml = new XmlDocument();
xmlXaml.Load(Server.MapPath("template.xml"));
// Set up the namespaces. These are necessary for XPathing an
// XML Document that contains multiple name spaces
// Note: The default namespace does not have a prefix, but
// in order to XPath it, we have to prefix it with one,
// so I use 'd' (for default)
NameTable myn = new NameTable();
XmlNamespaceManager mng = new XmlNamespaceManager(new NameTable());
mng.AddNamespace("d",
"http://schemas.microsoft.com/winfx/2006/xaml/presentation");
mng.AddNamespace("x", "http://schemas.microsoft.com/winfx/2006/xaml");When using XAML in ASP.NET with the XML APIs, you need to use an XmlNameSpaceManager to handle the different namespaces. Some elements in Silverlight use the default namespace, while others use the extended namespace prefixed with an "x:" (i.e. "x:Name"). You need to specify a prefix for the namespace manager when using a default namespace, so the "d" prefix is used. For example, when searching for nodes in the default namespace "Image" using XPath, you will refer to it as "d:Image."
Next, you'll get the list of item nodes from the RSS document. To do this, you will use the SelectNodes API to return a NodeList of items.
// The Hero bar items are stored in the RSS 'item' node
//Get a nodelist of the items.
XmlNodeList xnItems = rssFeed.SelectNodes("//item");Now you'll want to iterate through this list and make copies of the XAML canvas for each node:
for (int lp = 0; lp < xnItems.Count; lp++)
{
if (lp == 0)
{
itemCanvasTemplate =
xmlXaml.SelectSingleNode("//d:Canvas[@x:Name='cnvItem0']", mng);
}
else
{
XmlNode xNodeToCopy =
xmlXaml.SelectSingleNode("//d:Canvas[@x:Name='cnvItem0']", mng);
itemCanvasTemplate = xNodeToCopy.Clone();
}Now that you have your node, you’ll want to edit the details, to put the image, headline and text from the RSS Item:
// Now that we have our node, we will customize it with the details taken from the RSS Item.
//First, set up the variables holding the RSS items.
string strItemTitle = xnItems[lp].SelectSingleNode("title").InnerText;
string strItemLink = xnItems[lp].SelectSingleNode("link").InnerText;
string strItemDescription =
xnItems[lp].SelectSingleNode("description").InnerText;
string strItemPicture =
xnItems[lp].SelectSingleNode("enclosure").Attributes["url"].InnerText;
// Then, edit the node with these items directly
// 1. Edit the canvas to give it a unique ID
string strCanvasName = "cnvItem" + lp;
itemCanvasTemplate.Attributes["x:Name"].Value = strCanvasName;
// 2. Edit the Image Name and Source
XmlNode xNode =
itemCanvasTemplate.SelectSingleNode("//d:Image[@x:Name='img0']", mng);
string strImageName = "img" + lp;
xNode.Attributes["x:Name"].Value = strImageName;
xNode.Attributes["Source"].Value = strItemPicture;
// 3. Edit the Headline Textblock name and content
xNode =
itemCanvasTemplate.SelectSingleNode("//d:TextBlock[@x:Name='hdln0']", mng);
string strHeadlineName = "hdln" + lp;
xNode.Attributes["x:Name"].Value = strHeadlineName;
xNode.Attributes["Text"].Value = strItemTitle;
// 4. Edit the Details Texblock name and content
xNode =
itemCanvasTemplate.SelectSingleNode("//d:TextBlock[@x:Name='detl0']", mng);
string strDetailsName = "detl" + lp;
xNode.Attributes["x:Name"].Value = strDetailsName;
xNode.Attributes["Text"].Value = strItemDescription;
xmlXaml.DocumentElement.AppendChild(itemCanvasTemplate);The process for cloning and editing the animation is very similar. You can see this in the code download for this article.
Managing the URLs
One small problem with XAML is that when you specify the JavaScript event handler for the page, you cannot parameterize it. Thus, you cannot put the individual URI for an element in the hero banner into your XAML like this:
MouseLeftButtonDown="javascript:DoClick(MyURI)"
To instead determine the URI, you will have to call a generic DoClick function and use the ID of the canvas that raised the event. A second ASPX page will read the RSS and generate a JavaScript array. The page containing the Silverlight banner can then reference this and the JavaScript event handler will use this JavaScript array.
The following is the C# code to write out a JavaScript array:
XmlNodeList xnItems = xmlDoc.SelectNodes("//item");
Response.Write("var urls = new Array()\n");
for (int lp = 0; lp < xnItems.Count; lp++)
{
string strItemLink = xnItems[lp].SelectSingleNode("link").InnerText;
Response.Write("urls[" + lp + "]='" + strItemLink + "';\n");
}And here is an example of a JavaScript array that it writes out:
var urls = new Array() urls[0]='http://channel9.msdn.com/playground/wpfe/rvbplayer/'; urls[1]='http://channel9.msdn.com/playground/wpfe/grandpiano/'; urls[2]='http://channel9.msdn.com/playground/wpfe/wpfepad/';
Rendering the Hero Banner in Silverlight
Now that you have all the pieces in place, it is a simple matter to render the hero banner using Silverlight.
The complete code for an HTML page that implements it, along with the JavaScript to handle the URLs follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<title>Untitled Page</title>
<script type="text/javascript" src="js/silverlight.js"></script>
<script type="text/javascript" src="js/createSilverlight.js"></script>
<script type="text/javascript" src="GenerateJS.aspx"></script>
<script type="text/javascript">
function DoClick(sender,args)
{
var n = sender.name.replace(/cnvItem/,"");
window.open(urls[n]);
}
</script>
</head>
<body>
<div id='slControlHost'>
<script type="text/javascript">
createSilverlight();
</script>
</div>
</body>
</html>Notice the reference to the GenerateJS.aspx page is a <script> reference. This will call the GenerateJS.aspx page, which in turn generates a JavaScript array (as in the previous section).
The <Canvas> elements in the XAML specifies that DoClick should handle the mouse left button down, and this function is implemented here. It creates n, a new var. It also sets it to the value of the sender, replacing the string cnvItem with an empty string.
The sender contains the name of the canvas that raised the event, such as cnvItem0, cnvItem1. Replacing cnvItem with an empty string then assigns n to 0 or 1 in these cases. Then, to navigate to a URL specified in the urls array (generated by GenerateJS.aspx), you use Window.Open(urls[n]).
Finally, it sets up the Silverlight control using the call with createSilverlight(). This is present in the createSilverlight.js javascript library that was included at the top of the page. This contains the instantiation code for the Silverlight control that you can see here:
function createSilverlight()
{
Sys.Silverlight.createObject("GenerateXaml.aspx",
slControlHost, "slControl1",
{width:'960', height:'150', inplaceInstallPrompt:true,
background:'black', isWindowless:'true',
framerate:'24', version:'0.8'
},
{onError:null, onLoad:null},
null);
}The first parameter is GenerateXaml.aspx, which generates the XAML as we saw earlier. Silverlight then renders it. As such, you'll now have a hero banner on your page, which you can easily amend using different XAML, and easily update by updating your RSS.
This shows how Silverlight fits nicely into the overall developer ecosystem of Microsoft tools—using RSS, ASP.NET, XAML and Silverlight to mash-up a new application!
댓글을 달아 주세요
-
Mont Blanc Watches 2012.08.03 13:37 ADDR EDIT/DEL REPLY
Wow really glad i found your blog, i’ll be sure to visit back now i’ve bookmarked it.
그리고 다양한 효과를 볼 수 있습니다.
-------------------------------------------------------
김영욱 Microsoft MVP 2006~2007
-------------------------------------------------------
Email: iwinkey@hotmail.com
Blog: winkey.tistory.com
Phone: 016-817-0063
www.winkey.pe.kr
www.vismuri.com
-------------------------------------------------------
댓글을 달아 주세요
-------------------------------------------------------
김영욱 Microsoft MVP 2006~2007
-------------------------------------------------------
Email: iwinkey@hotmail.com
Blog: winkey.tistory.com
Phone: 016-817-0063
www.winkey.pe.kr
www.vismuri.com
-----------------------------------------------

An Overview of Visual Studio code name Orcas White Paper.xps
An Overview of Visual Studio code name Orcas White Paper.docx
An Overview of Visual Studio code name Orcas White Paper.pdf
댓글을 달아 주세요