Clipboard.SetContentWithOptions(DataPackage, ClipboardContentOptions) Method

Definition

Sets the content that is stored in the clipboard object with options for the content.

public:
 static bool SetContentWithOptions(DataPackage ^ content, ClipboardContentOptions ^ options);
 static bool SetContentWithOptions(DataPackage const & content, ClipboardContentOptions const & options);
public static bool SetContentWithOptions(DataPackage content, ClipboardContentOptions options);
function setContentWithOptions(content, options)
Public Shared Function SetContentWithOptions (content As DataPackage, options As ClipboardContentOptions) As Boolean

Parameters

content
DataPackage

Contains the content to store in the clipboard. If null, the clipboard is emptied.

options
ClipboardContentOptions

An object that specifies options for the clipboard content, such as whether the content is allowed in the clipboard history and whether it will be synced to other devices.

Returns

Boolean

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Applies to