IDataTransferItem Interface
Definition
Represent an item inside a Avalonia.Input.IDataTransfer. An item may support several formats and can return the value of a given format on demand.
public interface IDataTransferItem
See also
Methods
| Name | Description |
|---|---|
| TryGetRaw | Tries to get a value for a given format. |
TryGetRaw Method
Tries to get a value for a given format.
public object TryGetRaw(Avalonia.Input.DataFormat format)
Parameters
format Avalonia.Input.DataFormat
The format to retrieve.
Returns
object
A value for format, or null if the format is not supported.
Remarks
Implementations of this method are expected to return a value matching the exact type of the generic argument of the underlying Avalonia.Input.DataFormat<T>.
To retrieve a typed value, use Avalonia.Input.DataTransferItemExtensions.TryGetValue<T>(Avalonia.Input.IDataTransferItem,Avalonia.Input.DataFormat{<>}).
See also
Properties
| Name | Description |
|---|---|
| Formats | Gets the formats supported by this item. |
Formats Property
Gets the formats supported by this item.
public System.Collections.Generic.IReadOnlyList<Avalonia.Input.DataFormat> Formats { get; set; }