ResponseText

Gets downloaded data from a successful download request.

XAML
Cannot be used in XAML.
Scripting
value = downloaderObject.ResponseText

Property Value

string

The downloaded data. As in HTML, the return value can be examined and is passed as a string in a packet, but ultimately is interpreted by whatever property you set with this value.

Remarks

You generally only use this property from within the event handler for a Downloader Completed event. Outside of this context, there is no guarantee that a ResponseText value is valid.

When a Downloader object request is completed and successful, the ResponseText property contains a representation of the downloaded content as a string value. The value can represent XAML content, JavaScript content, or a media asset, such as an image.

If you are requesting parts of a package, use GetResponseText.

Note  If you are downloading media assets for use by the Source property of Image and MediaElement objects, you should consider using the SetSource (Image) or SetSource (MediaElement) methods rather than setting an object with GetResponseText or ResponseText and then setting the Source properties. This is a more efficient way to transfer large-sized media assets. ImageBrush also has an equivalent SetSource.

Applies To

Downloader

See Also

Using a Downloader Object
Completed
SetSource (MediaElement)
Status
StatusText