当前位置:编程学习 > C#/ASP.NET >>

ASP.NET 和 Silverlight4

最近刚学sl,想问下 我创建了个 silverlight程序DEMO2,demo2里面写了多个.xaml文件, 然后再 DEMO2.WEB/ClientBin/里面生成了一个 demo2.xap文件。 可以我在.aspx页面里引用刚才的 sl程序就能引用到MainPage.xaml里面写的内容。不能用到第二个.xaml .aspx文件是这么写的 <body> <form id="form1" runat="server" style="height:100%"> <div id="silverlightControlHost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="ClientBin/Demo2.xap"/> <param name="onError" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="4.0.50401.0" /> <param name="autoUpgrade" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none"> <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/> </a> </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div> </form> </body> 要怎么写才能引用到 我写的第二个.xaml文件呢? 可以HI 我
追问:怎么初始化呢?现在App.xaml 里内容如下
<Application xmlns=""
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="Demo2.App"
             >
---------。cs
   private void Application_Startup(object sender, StartupEventArgs e)
        {
            this.RootVisual = new MainPage();
        }
怎么样才能用到第二个呢?
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,