Silverlight 4.0 在silverlight 4中读取AppManifest.xaml文件时出错

Silverlight 4.0 在silverlight 4中读取AppManifest.xaml文件时出错,silverlight-4.0,Silverlight 4.0,我是silverlight的新手。在我的应用程序中,我必须动态加载不同的XAP文件 我在读取AppManifest.xaml文件时遇到以下错误 未实现该方法或操作 这是我的密码 私有子按钮\单击\ 2(ByVal发送者作为System.Object,ByVal e作为System.Windows.RoutedEventArgs) 我怎样才能解决这个问题 问候, JN Dim wc As New WebClient() AddHandler wc.OpenReadComplet

我是silverlight的新手。在我的应用程序中,我必须动态加载不同的XAP文件

我在读取AppManifest.xaml文件时遇到以下错误

未实现该方法或操作

这是我的密码

私有子按钮\单击\ 2(ByVal发送者作为System.Object,ByVal e作为System.Windows.RoutedEventArgs)

我怎样才能解决这个问题

问候,

JN

    Dim wc As New WebClient() 

    AddHandler wc.OpenReadCompleted, AddressOf EndOpenReadCompleted2

    wc.OpenReadAsync(New Uri("WebPortalUI.xap", UriKind.Relative))



End Sub



Private Sub EndOpenReadCompleted2(ByVal sender As Object, ByVal e As OpenReadCompletedEventArgs) 



    Dim appManifest As String = New StreamReader(Application.GetResourceStream(New StreamResourceInfo(e.Result, Nothing), New Uri("AppManifest.xaml", UriKind.Relative)).Stream).ReadToEnd()

    'Dim deploy As Deployment = TryCast(XamlReader.Load(appManifest), Deployment)

    Dim deploy As XElement = XDocument.Parse(appManifest).Root  //Here Error is coming





    Dim asm As System.Reflection.Assembly = Nothing



    For Each asmpart As AssemblyPart In deploy.Parts

        Dim source As String = asmpart.Source

        Dim streamInfo As StreamResourceInfo = Application.GetResourceStream(New StreamResourceInfo(e.Result, "application/binary"), New Uri(source, UriKind.Relative))

        asm = asmpart.Load(streamInfo.Stream)

    Next



    Dim type As Type = asm.GetType("WebPortalUI.Reports")   // Reports.xaml is one page