Defines an item within a data transfer operation, exposing supported data formats and allowing retrieval of values on demand; used for clipboard and drag‑and‑drop handling.
// Source: https://github.com/AvaloniaUI/Avalonia | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
using System.Collections.Generic;
namespace Avalonia.Input;
/// <summary>
/// Represent an item inside a <see cref="IDataTransfer"/>.
/// An item may support several formats and can return the value of a given format on demand.
/// </summary>
/// <seealso cref="DataTransferItem"/>
public interface IDataTransferItem
{
/// <summary>
/// Gets the formats supported by this item.
/// </summary>
IReadOnlyList<DataFormat> Formats { get; }
/// <summary>
/// Tries to get a value for a given format.
/// </summary>
/// <param name="format">The format to retrieve.</param>
/// <returns>A value for <paramref name="format"/>, or null if
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key