Clipboard.SetContentWithOptions(DataPackage, ClipboardContentOptions) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. This parameter may not be null.
- 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. This parameter may be null, in which case default options are used.
Returns
bool
True if the content was set to the clipboard. False if the content could not be set, for example, because the clipboard is already in use by another process.
Windows requirements
Device family |
Windows 10, version 1809 (introduced in 10.0.17763.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v7.0)
|