zoukankan      html  css  js  c++  java
  • 第三篇: Silverlight 2.0 下载与安装

    1. 下载 Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 54.5 MB
    2. 双击安装

    3. 打开 VS 2008, 新建项目 Visual C#
        里面多个两项, Silverlight Class Library, Silverlight Application

    4. 选择 Silverlight Application, 命名为 MyFirstSilverlight


    5. 在Project Type 里选Web Application Project


    在点击OK之后,Visual Studio 会为我们创建一个解决方案,里面包含一个Silverlight 客户端应用和一个ASP.NET web 服务器端应用



    6.  现在我们来做第一个Hello World !!
            点 Page.xml, 出现如图


        在<Grid></Grid> 中间输入代码~~
        
        <Grid x:Name="LayoutRoot" Background="White">
            <Button x:Name="Button1" Content="点我试试" Width="100" Height="50"  Click="Button1_Click" />
        </Grid>


        

          当输入 Click时,点 新建事件处理程序
    VS就会自动地在我们的后台代码类文件中创建一个事件处理函数。

    7. 在 Page.xaml.cd 中输入代码

    using System;
    using System.Collections.Generic;
    using System.Linq;
    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 MyFirstSilverlight
    {
        
    public partial class Page : UserControl
        {
            
    public Page()
            {
                InitializeComponent();
            }

            
    private void Button1_Click(object sender, RoutedEventArgs e)
            {
                Button1.Content 
    = "Hello World !!";
            }
        }
    }



    8. 运行  ~~



  • 相关阅读:
    CSS-DAY03
    Java语言支持的8种基本数据类型
    Linux目录结构
    面向对象的四个基本特征
    使用AVADA头部有搜索icon怎么去掉?
    在ubuntu 上使用apt-get安装 任意版本
    ubuntu 14.04 nginx 1.12.2 配置https遇见的坑
    java Process执行linux命令
    node.js 接收上传的文件
    node.js 进行http get 向服务端请求
  • 原文地址:https://www.cnblogs.com/LinFx/p/2123704.html
Copyright © 2011-2022 走看看