GetDataPresent Method (String, Boolean)
Collapse the table of content
Expand the table of content

IDataObject.GetDataPresent Method (String, Boolean)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Checks whether the data is available in, or can be converted to, a specified format. If the data is not already available in the specified format, a Boolean flag indicates whether to check if the data can be converted to the specified format.

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

'Declaration
Function GetDataPresent ( _
	format As String, _
	autoConvert As Boolean _
) As Boolean

Parameters

format
Type: System.String
A string that specifies the format to check for.
autoConvert
Type: System.Boolean
false to only check for the specified format; true to also check whether the data that is stored in this data object can be converted to the specified format.

Return Value

Type: System.Boolean
true if the data is in, or can be converted to, the specified format; otherwise, false.

This method returns true if either of the following applies:

  • The autoConvert parameter is true, and the data is in the specified format or it can be converted to the specified format.

  • The autoConvert parameter is false, and the data is in the specified format.

This method returns false if either of the following applies:

  • The autoConvert parameter is true, and the data is not available in the specified format and cannot be converted to the specified format.

  • The autoConvert parameter is false, and the data is not available in the specified format.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft