Skip to main content
Version: 4.1

Clipboard

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Provides methods to place data on and retrieve data from the system Clipboard. This class cannot be inherited.

public class Clipboard

Methods

Static member Clear()

Removes all data from the Clipboard.

Static member ContainsAudio()

Indicates whether there is data on the Clipboard in the WaveAudio format.

Returns: Boolean. true if there is audio data on the Clipboard; otherwise, false.

Static member ContainsData(format)

Indicates whether there is data on the Clipboard that is in the specified format or can be converted to that format.

ParameterTypeDescription
formatStringThe format of the data to look for. See DataFormats for predefined formats.

Returns: Boolean. true if there is data on the Clipboard that is in the specified format or can be converted to that format; otherwise, false.

Static member ContainsFileDropList()

Indicates whether there is data on the Clipboard that is in the FileDrop format or can be converted to that format.

Returns: Boolean. true if there is a file drop list on the Clipboard; otherwise, false.

Static member ContainsImage()

Indicates whether there is data on the Clipboard that is in the Bitmap format or can be converted to that format.

Returns: Boolean. true if there is image data on the Clipboard; otherwise, false.

Static member ContainsText()

Indicates whether there is data on the Clipboard in the Text or UnicodeText format, depending on the operating system.

Returns: Boolean. true if there is text data on the Clipboard; otherwise, false.

Static member ContainsText(format)

Indicates whether there is text data on the Clipboard in the format indicated by the specified TextDataFormat value.

ParameterTypeDescription
formatTextDataFormatOne of the TextDataFormat values.

Returns: Boolean. true if there is text data on the Clipboard in the value specified for format ; otherwise, false.

Static member GetAudioStream()

Retrieves an audio stream from the Clipboard.

Returns: Stream. A Stream containing audio data or null if the Clipboard does not contain any data in the WaveAudio format.

Static member GetData(format)

Retrieves data from the Clipboard in the specified format.

ParameterTypeDescription
formatStringThe format of the data to retrieve. See DataFormats for predefined formats.

Returns: Object. An Object representing the Clipboard data or null if the Clipboard does not contain any data that is in the specified format or can be converted to that format.

Static member GetDataObject()

Retrieves the data that is currently on the system Clipboard.

Returns: IDataObject. An IDataObject that represents the data currently on the Clipboard, or null if there is no data on the Clipboard.

Static member GetFileDropList()

Retrieves a collection of file names from the Clipboard.

Returns: StringCollection. A StringCollection containing file names or null if the Clipboard does not contain any data that is in the FileDrop format or can be converted to that format.

Static member GetImage()

Retrieves an image from the Clipboard.

Returns: Image. An Image representing the Clipboard image data or null if the Clipboard does not contain any data that is in the Bitmap format or can be converted to that format.

Static member GetText()

Retrieves text data from the Clipboard in the Text or UnicodeText format, depending on the operating system.

Returns: String. The Clipboard text data or Empty if the Clipboard does not contain data in the Text or UnicodeText format, depending on the operating system.

Static member GetText(format)

Retrieves text data from the Clipboard in the format indicated by the specified TextDataFormat value.

ParameterTypeDescription
formatTextDataFormatOne of the TextDataFormat values.

Returns: String. The Clipboard text data or Empty if the Clipboard does not contain data in the specified format.

Static member SetAudio(audioBytes)

Saves the Byte array in the WaveAudio format after converting it to a Stream to the clipboard.

ParameterTypeDescription
audioBytesByte[]A Byte array containing the audio data.

Throws:

Static member SetAudio(audioStream)

Saves the Stream in the WaveAudio format to the clipboard.

ParameterTypeDescription
audioStreamStreamA Stream containing the audio data.

Throws:

Static member SetClientText(text)

Saves the text data to the client's temporary clipboard. Client side javascript code can copy the clipboard's content to the browser's clipboard calling Wisej.Core.copy();

ParameterTypeDescription
textStringThe text to save to the client's temporary clipboard.

Throws:

Static member SetData(format, data)

Saves the specified data to the clipboard in the specified format.

ParameterTypeDescription
formatStringThe format of the data to set. See DataFormats for predefined formats.
dataObjectAn Object representing the data to add.

Throws:

Static member SetDataObject(data)

Saves the specified data to the clipboard.

ParameterTypeDescription
dataObjectThe data to place on the Clipboard.

Throws:

Static member SetFileDropList(filePaths)

Saves the collection of file names in the FileDrop format to the clipboard.

ParameterTypeDescription
filePathsStringCollectionA StringCollection containing the file names.

Throws:

Static member SetImage(image)

Saves the Image in the Bitmap format to the clipboard

ParameterTypeDescription
imageImageThe Image to add to the Clipboard.

Throws:

Static member SetText(text)

Saves the text data in the UnicodeText format to the clipboard.

ParameterTypeDescription
textStringThe text to add to the Clipboard.

Throws:

Static member SetText(text, format)

Saves the text data in the format indicated by the specified TextDataFormat value to the clipboard.

ParameterTypeDescription
textStringThe text to add to the Clipboard.
formatTextDataFormatOne of the TextDataFormat values.

Throws: