Muokkaa

Jaa


DataFormats.GetDataFormat Method

Definition

Returns a DataFormat object that defines a name and numeric ID for a specified data format.

Overloads

GetDataFormat(Int32)

Returns a DataFormat object that defines a name and numeric ID for the specified data format. The desired data format is specified by numeric ID.

GetDataFormat(String)

Returns a DataFormat object that defines a name and numeric ID for the specified data format. The desired data format is specified by name (a string).

Remarks

This method can also be used to register new formats. If the specified format cannot be found, it is automatically registered as a new data format.

GetDataFormat(Int32)

Returns a DataFormat object that defines a name and numeric ID for the specified data format. The desired data format is specified by numeric ID.

public:
 static System::Windows::DataFormat ^ GetDataFormat(int id);
public static System.Windows.DataFormat GetDataFormat (int id);
static member GetDataFormat : int -> System.Windows.DataFormat
Public Shared Function GetDataFormat (id As Integer) As DataFormat

Parameters

id
Int32

The numeric ID of the data format to request a DataFormat object for.

Returns

A DataFormat object that contains the numeric ID and the name of the requested data format.

Remarks

This method can also be used to register new formats. If the specified format cannot be found, it is automatically registered as a new data format.

Applies to

GetDataFormat(String)

Returns a DataFormat object that defines a name and numeric ID for the specified data format. The desired data format is specified by name (a string).

public:
 static System::Windows::DataFormat ^ GetDataFormat(System::String ^ format);
[System.Security.SecurityCritical]
public static System.Windows.DataFormat GetDataFormat (string format);
public static System.Windows.DataFormat GetDataFormat (string format);
[<System.Security.SecurityCritical>]
static member GetDataFormat : string -> System.Windows.DataFormat
static member GetDataFormat : string -> System.Windows.DataFormat
Public Shared Function GetDataFormat (format As String) As DataFormat

Parameters

format
String

The name of the data format to request a DataFormat object for.

Returns

A DataFormat object that contains the numeric ID and the name of the requested data format.

Attributes

Exceptions

format is null.

Remarks

This method can also be used to register new formats. If the specified format cannot be found, it is automatically registered as a new data format.

See also

Applies to