Question

Mon application silverlight doit retourner à l'hôte d'où elle est venue pour ses données. Comment faire en sorte que le client Web se reconnecte à la racine de ce site.

Par exemple, mon silverlight xap se trouve dans un compartiment Amazon S3 et chargé via un fichier HTML dans ce même compartiment. Je souhaite effectuer une http://mybucket.s3.amazonaws.com/ , puis passer à l'action. le xml renvoyé par cet objet GET.

Était-ce utile?

La solution

Utilisez System.Windows.Application.Host - voir la documentation , qui contient cet exemple:

" L'exemple suivant montre comment utiliser Host pour obtenir le chemin d'accès au package de l'application Silverlight. "

<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>

Autres conseils

Application.Current.Host.Source en C #

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top