DataRequest.FailWithDisplayText(String) DataRequest.FailWithDisplayText(String) DataRequest.FailWithDisplayText(String) DataRequest.FailWithDisplayText(String) DataRequest.FailWithDisplayText(String) Method

Definition

Cancels the sharing operation and supplies an error string to display to the user.

public : void FailWithDisplayText(Platform::String value)
void FailWithDisplayText(winrt::hstring value) const;
public void FailWithDisplayText(String value)
Public Sub FailWithDisplayText(value As String)
dataRequest.failWithDisplayText(value);

Parameters

value
String String String

The text to display to the user.

Remarks

Use the FailWithDisplayText method when your app is unable to supply a DataPackage to a target app. This method cancels the share operation and supplies a text message to the target app. The target app can then display this text to the user to explain why the share operation failed.

This API was marked as deprecated in SDK versions 1511 and 1607. However, this API is no longer deprecated as of 1703. You can suppress the deprecation warning in Visual Studio by following instructions in the How to: Suppress Compiler Warnings topic.