Silverlight和asp网页

时间:2012-03-02 23:18:55

标签: c# asp.net silverlight c#-4.0 silverlight-4.0

我做了一个像这样的Silverlight项目:

<UserControl x:Class="silverlighttest3.MainPage"
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" Height="270" Width="487">

<Grid x:Name="LayoutRoot" Background="blue" Height="270" Width="487" HorizontalAlignment="Stretch">
    <MultiScaleImage HorizontalAlignment="Left" Margin="146,27,0,0" Name="multiScaleImage1" VerticalAlignment="Top" Source="Source/dzc_output.xml"/>
</Grid>

之后我测试了它并且工作正常。

问题是在测试托管Silverlight项目的Web应用程序时,在尝试'testsilverlight.aspx'时没有显示任何内容。

注意:源文件夹位于Silverlight目录中,而不在Web应用程序目录中。当将其复制到Web应用程序目录时,结果是相同的 - 白页。

1 个答案:

答案 0 :(得分:0)

我找到了一个可能对您有帮助的链接:Source attribute of Silverlight MultiScaleImage

另外,我不确定您的项目结构是如何设置的,但要确保xml文件上的构建操作设置为Content,并且在内置相同的相对文件夹结构后将其包含在xap文件中

相关问题