Share via


DataRequest.FailWithDisplayText(String) Method

Definition

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

public:
 virtual void FailWithDisplayText(Platform::String ^ value) = FailWithDisplayText;
void FailWithDisplayText(winrt::hstring const& value);
/// [Windows.Foundation.Metadata.Deprecated("FailWithDisplayText is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
void FailWithDisplayText(winrt::hstring const& value);
public void FailWithDisplayText(string value);
[Windows.Foundation.Metadata.Deprecated("FailWithDisplayText is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
public void FailWithDisplayText(string value);
function failWithDisplayText(value)
Public Sub FailWithDisplayText (value As String)

Parameters

value
String

Platform::String

winrt::hstring

The text to display to the user.

Attributes

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.

Applies to