Skip to main content

DataFormat<T> Class

Definition

Namespace:Avalonia.Input
Assembly:Avalonia.Base
Package:Avalonia

Represents a format usable with the clipboard and drag-and-drop, with a data type.

public class DataFormat<T>

Inheritance: object -> DataFormat -> DataFormat<T>

Remarks

This class cannot be instantiated directly. Use universal formats such as Avalonia.Input.DataFormat.Text and Avalonia.Input.DataFormat.File, or create custom formats using Avalonia.Input.DataFormat.CreateBytesApplicationFormat(string), Avalonia.Input.DataFormat.CreateStringApplicationFormat(string), Avalonia.Input.DataFormat.CreateBytesPlatformFormat(string) or Avalonia.Input.DataFormat.CreateStringPlatformFormat(string).

Methods

NameDescription
CreateBytesApplicationFormatCreates a new format specific to the application that returns an array of byte. Inherited from DataFormat.
CreateBytesPlatformFormatCreates a new format for the current platform that returns an array of byte. Inherited from DataFormat.
CreateStringApplicationFormatCreates a new format specific to the application that returns a string. Inherited from DataFormat.
CreateStringPlatformFormatCreates a new format for the current platform that returns a string. Inherited from DataFormat.
Equals (2 overloads)Inherited from DataFormat.
GetHashCodeInherited from DataFormat.
ToStringInherited from DataFormat.
ToSystemNameCreates a name for this format, usable by the underlying platform. Inherited from DataFormat.

Properties

NameDescription
BitmapGets a data format representing a bitmap. Its data type is Avalonia.Media.Imaging.Bitmap. Inherited from DataFormat.
FileGets a data format representing a single file. Its data type is Avalonia.Platform.Storage.IStorageItem. Inherited from DataFormat.
IdentifierGets the identifier of the data format. Inherited from DataFormat.
KindGets the kind of the data format. Inherited from DataFormat.
TextGets a data format representing plain text. Its data type is string. Inherited from DataFormat.