Class DataObject
- Namespace
- RDCore.Forms.Model
- Assembly
- RDCore.Forms.dll
The data a drag carries, or a cut, copy or paste: RDForms.DataObject, the Data of a BeforeDragOver and a
BeforeDropOrPaste. It holds text in formats: the text format, and custom formats a program names.
public sealed class DataObject
- Inheritance
-
DataObject
- Inherited Members
Remarks
RDForms does not implement drag and drop, so no event gives a program one; a program can make one with New. Its
clipboard methods (PutInClipboard, GetFromClipboard) and StartDrag are not implemented.
Properties
Formats
The formats the object holds text in, the text format first where it holds one: null stands for the text format, and a string for a custom format of that name.
public IReadOnlyList<string?> Formats { get; }
Property Value
Methods
Clear()
Takes out the text of every format.
public void Clear()
GetFormat(string?)
Whether the object holds text in a format.
public bool GetFormat(string? format = null)
Parameters
Returns
Exceptions
- ArgumentException
formatis empty.
GetText(string?)
The text the object holds in a format.
public string? GetText(string? format = null)
Parameters
Returns
Exceptions
- ArgumentException
formatis empty.
SetText(string, string?)
Puts text in the object in a format, in place of the text it held in that format.
public void SetText(string text, string? format = null)
Parameters
Exceptions
- ArgumentNullException
textis null.- ArgumentException
formatis empty.