xaml使用另外一个xaml
A页面里面有一个注册框B页面中有一个头(logo和导航部分)有什么办法把注册框放在logo页面中啊两个文件都是xamlsilverlight编程...
A页面里面有一个注册框 B页面中有一个头(logo 和导航部分) 有什么办法把注册框放在logo页面中啊 两个文件都是xaml silverlight编程
展开
1个回答
2011-09-23
展开全部
ASPX页面里面加这段:
<object id="Video" data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="100%">
<param name="source" value="ClientBin/TestSilverlight.xap" />
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="initParams" value="startPage=Video" />
<a href="" style="text-decoration: none">
<img src="" alt="获取 Microsoft Silverlight"
style="border-style: none" />
</a>
</object>
<iframe id="_sl_historyFrame" style="visibility: hidden; height: 0px; width: 0px;
border: 0px"></iframe>
App.cs里面:
private void Application_Startup(object sender, StartupEventArgs e)
{
//里面传递参数
string startPageParameter = "startPage";
if (!e.InitParams.ContainsKey(startPageParameter))
{
this.RootVisual = new Photo();
}
else
{
switch(e.InitParams[startPageParameter])
{
case "Photo":
this.RootVisual = new Photo();
break;
case "Video":
this.RootVisual = new Video();
break;
}
}
}
<object id="Video" data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="100%">
<param name="source" value="ClientBin/TestSilverlight.xap" />
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="initParams" value="startPage=Video" />
<a href="" style="text-decoration: none">
<img src="" alt="获取 Microsoft Silverlight"
style="border-style: none" />
</a>
</object>
<iframe id="_sl_historyFrame" style="visibility: hidden; height: 0px; width: 0px;
border: 0px"></iframe>
App.cs里面:
private void Application_Startup(object sender, StartupEventArgs e)
{
//里面传递参数
string startPageParameter = "startPage";
if (!e.InitParams.ContainsKey(startPageParameter))
{
this.RootVisual = new Photo();
}
else
{
switch(e.InitParams[startPageParameter])
{
case "Photo":
this.RootVisual = new Photo();
break;
case "Video":
this.RootVisual = new Video();
break;
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询