DataPackageView.GetTextAsync() | getTextAsync() method

Applies to Windows and Windows Phone

Gets the text in the DataPackageView object.

Syntax


public:
IAsyncOperation<String^>^ GetTextAsync()

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<String>

The text.

Examples


var shareOperation = eventObject.detail.shareOperation;
if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.text)) {
    shareOperation.data.getTextAsync().done(function (text) {
            // To output the text using this example, 
            // you need a div tag with an id of "output" in your HTML file.
            document.getElementById("output").innerText = text;
        }, function (e) {
            displayError("Error retrieving Text format: " + e);
        }
    });
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.ApplicationModel.DataTransfer
Windows::ApplicationModel::DataTransfer [C++]

Metadata

Windows.winmd

See also

DataPackageView
GetTextAsync(String)

 

 

Show:
© 2014 Microsoft