Skip to main content

Create<T>(DataFormat<T>, Func<T>) Method

Creates a new DataTransferItem for a single format with a given value created on demand.

Definition

Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public static DataTransferItem Create<T>(
DataFormat<T> format,
Func<T> getValue
)
where T : class

Parameters

  DataFormat(T)
The format.
  Func(T)
A function returning the value corresponding to format.

Type Parameters

The value type.

Return Value

DataTransferItem
A DataTransferItem instance.

See Also

Reference

DataTransferItem Class
Create Overload
Avalonia.Input Namespace