惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
Forbes - Security
Forbes - Security
IT之家
IT之家
I
InfoQ
The Register - Security
The Register - Security
宝玉的分享
宝玉的分享
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
Recorded Future
Recorded Future
Google DeepMind News
Google DeepMind News
U
Unit 42
V
Visual Studio Blog
Cyberwarzone
Cyberwarzone
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Project Zero
Project Zero
L
LINUX DO - 热门话题
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
美团技术团队
博客园 - Franky
F
Full Disclosure
P
Privacy International News Feed
NISL@THU
NISL@THU
MyScale Blog
MyScale Blog
C
CERT Recently Published Vulnerability Notes
Microsoft Security Blog
Microsoft Security Blog
P
Palo Alto Networks Blog
小众软件
小众软件
S
Secure Thoughts
T
Threat Research - Cisco Blogs
Schneier on Security
Schneier on Security
PCI Perspectives
PCI Perspectives
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
S
Securelist
Google Online Security Blog
Google Online Security Blog
L
Lohrmann on Cybersecurity
Y
Y Combinator Blog

博客园 - everx

CruiseControl.net - 找到的一些文档。分享出来 【摘抄】回归测试(Regression Test) 那就来说说ASP.NET MVC中的Routing吧 ASP.NET MVC - View ASP.NET MVC - Controller(part Ⅱ) ASP.NET MVC - Controller(part Ⅰ) ASP.NET MVC - Model 学一下ASP.NET MVC C# 3.0的新特性 jQuery学习笔记(八) jQuery 学习笔记(七) SilverLight学习之路(四) Silverlight学习之路(三) - everx - 博客园 JQuery学习笔记(六) JQuery学习笔记(五) 初次使用log4net Silverlight学习之路(二) JQuery学习笔记(四) JQuery学习笔记(三)
播下silverlight的种子
everx · 2008-02-21 · via 博客园 - everx

经过这么久,终于决定学Silverlight了。还是从最基本的QuickStart开始好了

一、QuickStart part1
1、准备工作
一个典型的Sliverlight需要4个文件
a. 一个html文件,用于存放silverlight插件
b. silverlight.js文件
c. 一个XAML文件
d. 和一个用于支持html文件的js文件

2、开始
先从SDK中找到silverlight.js,然后将其插入到html页中
<script type="text/javascript" src="Silverlight.js"></script>
再创建一个createSilverlight.js,用于创建silverlight插件
<script type="text/javascript" src="createSilverlight.js"></script>
接着创建存放silverlight插件的html元素,比如div。需要声明其ID 暂且为mySilverlightPluginHost
在这个div下,插入如下脚本块
<script type="text/javascript">
        // Retrieve the div element you created in the previous step.
        var parentElement =
            document.getElementById("mySilverlightPluginHost");
       
        // This function creates the Silverlight plug-in.
        createMySilverlightPlugin();
</script>
然后再createSilverlight.js 文件中添加如下脚本:
function createMySilverlightPlugin()

    Silverlight.createObject(
        "myxaml.xaml",                  // Source property value.
        parentElement,                  // DOM reference to hosting DIV tag.
        "mySilverlightPlugin",         // Unique plug-in ID value.
        {                               // Per-instance properties.
            width:'300',                // Width of rectangular region of
                                        // plug-in area in pixels.
            height:'300',               // Height of rectangular region of
                                        // plug-in area in pixels.
            inplaceInstallPrompt:false, // Determines whether to display
                                        // in-place install prompt if
                                        // invalid version detected.
            background:'#D6D6D6',       // Background color of plug-in.
            isWindowless:'false',       // Determines whether to display plug-in
                                        // in Windowless mode.
            framerate:'24',             // MaxFrameRate property value.
            version:'1.0'               // Silverlight version to use.
        },
        {
            onError:null,               // OnError property value --
                                        // event handler function name.
            onLoad:null                 // OnLoad property value --
                                        // event handler function name.
        },
        null);                          // Context value -- event handler function name.
}
好了,最后该创建silverlight的内容了
创建myxaml.xaml文件 ,由于上一步指定了这个文件名

二、QuickStart Part2
1、创建Canvas和命名空间声明
每一个XAML文件都以Canvas元素开头,就像html都以html开头一样
<Canvas
   xmlns="http://schemas.microsoft.com/client/2007"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</Canvas>

2、画一些东西
<Ellipse
    Height="200" Width="200"
    Stroke="Black" StrokeThickness="10" Fill="SlateBlue" />
这段语句画了一个圆,宽、高各200px,边框颜色为黑色,边框宽10px,填充颜色为SlateBlue

3、查看XAML内容
完成了,现在在浏览器中查看一下那个html文件,就可以预览刚刚的成果了