新聞中心
在Windows Azure中托管和調試Silverlight應用程序(下)
原創(chuàng)
作者:編譯/周雪峰 2011-03-22 10:03:55
云計算 本文用插圖的形式展示了如何在Windows Azure的local development fabric中托管和調試一個Silverlight應用程序。

創(chuàng)新互聯(lián)公司作為成都網(wǎng)站建設公司,專注重慶網(wǎng)站建設公司、網(wǎng)站設計,有關成都企業(yè)網(wǎng)站建設方案、改版、費用等問題,行業(yè)涉及成都柴油發(fā)電機等多個領域,已為上千家企業(yè)服務,得到了客戶的尊重與認可。
本文接《在Windows Azure中托管和調試Silverlight應用程序(上)》
步驟4
在XAML中添加一些代碼。我在Silverlight頁面上添加了一個按鈕和這個按鈕的“Click”事件,在調試模式中,我會在一個消息框中顯示一個消息:
MainPage.Xaml
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="300" d:DesignWidth="400">
MainPage.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;
namespace SilverlightApplication1
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void myButton_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("I am Debugging Silverlight in Azure ");
}
}
}
輸出:
步驟5
在Azure中調試Silverlight。
在C#代碼中插入一個斷點,然后你就可以調試這個被托管在Azure中的Silverlight應用程序了:
在運行中:
所以,Silverlight應用程序是在調試模式中。
總結
在本文中,我討論了如何在Windows Azure中托管和調試一個Silverlight應用程序。感謝您的閱讀!
原文名:Hosting and Debugging Silverlight in Windows Azure 作者:Dhananjay Kumar
本文接《在Windows Azure中托管和調試Silverlight應用程序(上)》
【本文乃51CTO精選譯文,轉載請標明出處!】
分享名稱:在WindowsAzure中托管和調試Silverlight應用程序(下)
URL標題:http://www.dlmjj.cn/article/dpgdsej.html


咨詢
建站咨詢
