Freigeben über


DataObject.GetDataPresent Method (String, Boolean)

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

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)

Syntax

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

Parameters

  • 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.

Implements

IDataObject.GetDataPresent(String, Boolean)

Exceptions

Exception Condition
NotImplementedException

Not implemented.

SecurityException

Attempted access in a mode other than Drop.

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.