DataObject.GetDataPresent Method (String, Boolean)

Checks whether the data is available in, or can be converted to, a specified format. A Boolean flag indicates whether to check if the data can be converted to the specified format, if it is not available in that format. Always throws an exception.

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


Public Function GetDataPresent ( _
    format As String, _
    autoConvert As Boolean _
) As Boolean
public bool GetDataPresent(
    string format,
    bool autoConvert


  • format
    Type: System.String
    A string that specifies the format to check for. See the DataFormats class for a set of predefined data formats.
  • autoConvert
    Type: System.Boolean
    false to only check for the specified format; true to also check whether data stored in this data object can be converted to the specified format.

Return Value

Type: System.Boolean
Always throws an exception.


IDataObject.GetDataPresent(String, Boolean)


Exception Condition

Not implemented.


Attempted access in a mode other than Drop.

Version Information


Supported in: 5, 4


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