DataPackageView.GetTextAsync DataPackageView.GetTextAsync DataPackageView.GetTextAsync DataPackageView.GetTextAsync DataPackageView.GetTextAsync Method

Definition

Overloads

GetTextAsync() GetTextAsync() GetTextAsync() GetTextAsync() GetTextAsync()

Gets the text in the DataPackageView object.

GetTextAsync(String) GetTextAsync(String) GetTextAsync(String) GetTextAsync(String) GetTextAsync(String)

Gets the text in the DataPackageView object.

GetTextAsync() GetTextAsync() GetTextAsync() GetTextAsync() GetTextAsync()

Gets the text in the DataPackageView object.

public : IAsyncOperation<Platform::String> GetTextAsync()
IAsyncOperation<winrt::hstring> GetTextAsync() const;
public IAsyncOperation<string> GetTextAsync()
Public Function GetTextAsync() As IAsyncOperation(Of string)
Windows.ApplicationModel.DataTransfer.DataPackageView.getTextAsync().done( /* Your success and error handlers */ );

Returns

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);
        }
    });
}
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);
        }
    });
}
See also
Windows.ApplicationModel.DataTransfer.DataPackageView.GetTextAsync(System.String) geview_gettextasync_160262668.md)

GetTextAsync(String) GetTextAsync(String) GetTextAsync(String) GetTextAsync(String) GetTextAsync(String)

Gets the text in the DataPackageView object.

public : IAsyncOperation<Platform::String> GetTextAsync(Platform::String formatId)
IAsyncOperation<winrt::hstring> GetTextAsync(winrt::hstring formatId) const;
public IAsyncOperation<string> GetTextAsync(String formatId)
Public Function GetTextAsync(formatId As String) As IAsyncOperation(Of string)
Windows.ApplicationModel.DataTransfer.DataPackageView.getTextAsync(formatId).done( /* Your success and error handlers */ );

Parameters

formatId
String String String

A string that represents the data format. Usually StandardDataFormats.text.

Returns

See also