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)
- C#
- VB
- F#
public static DataTransferItem Create<T>(
DataFormat<T> format,
Func<T> getValue
)
where T : class
Public Shared Function Create(Of T As Class) (
format As DataFormat(Of T),
getValue As Func(Of T)
) As DataTransferItem
static member Create :
format : DataFormat<'T> *
getValue : Func<'T> -> DataTransferItem when 'T : not struct
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