DataObject::GetFormats Method (Boolean)

 

Returns a list of formats in which the data in this data object is stored. A Boolean flag indicates whether to also include formats that the data can be automatically converted to.

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

public:
virtual array<String^>^ GetFormats(
	bool autoConvert
) sealed

Parameters

autoConvert
Type: System::Boolean

true to retrieve all formats in which the data in this data object is stored, or can be converted to; false to retrieve only formats in which the data in this data object is stored.

Return Value

Type: array<System::String^>^

An array of strings, with each string specifying the name of a format supported by this data object.

For a set of predefined data formats, see the DataFormats class.

The following example uses this method to get an array of strings denoting only data formats available in a data object (auto-convertible data formats are filtered).

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Silverlight
Available since 4.0
Return to top
Show: