2009-05-02 3 views
1

내 실버 라이트 앱은 데이터를 가져 오는 시점부터 호스트로 돌아 가야합니다. 웹 클라이언트가 해당 사이트의 루트에 다시 연결되게하려면 어떻게합니까?실버 라이트 앱의 호스트를 결정하는 방법

예를 들어 내 실버 라이트 xap은 Amazon S3 버킷에 앉아 있고 동일한 버킷의 HTML 파일을 통해로드됩니다. 내가 http://mybucket.s3.amazonaws.com/하고 그 GET에서 반환되는 XML에 따라 행동하고 싶습니다.

답변

3

사용 System.Windows.Application.Host -이 예를 포함 the documentation, 참조 :

는 "다음은 Silverlight 응용 프로그램 패키지의 경로를 얻기 위해 호스트를 사용하는 방법을 보여줍니다." 문서 링크에 대한 C#에서

<UserControl x:Class="SilverlightApplication.Page" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 

    <Grid> 
     <TextBlock Text="{Binding Source}" /> 
    </Grid> 

</UserControl> 
+0

감사합니다. 그것은 답의 가치에 추가됩니다. –

1

Application.Current.Host.Source는