Udostępnij za pośrednictwem


DataObject.GetFormats Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns a list of all formats that the data in this data object is stored in, or can be converted to.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Function GetFormats As String()
public string[] GetFormats()

Return Value

Type: array<System.String[]
An array of strings, with each string specifying the name of a format supported by this data object.

Implements

IDataObject.GetFormats()

Exceptions

Exception Condition
SecurityException

Attempted access in a mode other than Drop.

Remarks

If data is not null, returns a one-dimensional array that contains the single string equivalent to DataFormats.FileDrop. If data is null, returns an empty string array.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.