Class ListDialog
Represents a dialog with a list of selectable rows.
public class ListDialog : IDialog<ListDialogResponse>, IDialog, IEnumerable<ListDialogRow>, IEnumerable
- Inheritance
-
ListDialog
- Implements
- Inherited Members
Constructors
ListDialog(string, string?, string?)
Represents a dialog with a list of selectable rows.
public ListDialog(string caption, string? button1, string? button2 = null)
Parameters
captionstringThe caption.
button1stringThe text on the left button.
button2stringThe text on the right button. If the value is null, the right button is hidden.
Properties
Button1
Gets or sets the text on the left button of this list dialog.
public string? Button1 { get; set; }
Property Value
Button2
Gets or sets the text on the right button of this list dialog. If the value is null, the right button is hidden.
public string? Button2 { get; set; }
Property Value
Caption
Gets or sets the caption of this list dialog.
public string? Caption { get; set; }
Property Value
Rows
Gets the rows of this dialog.
public ListDialogRowCollection Rows { get; }
Property Value
Methods
Add(ListDialogRow)
Adds the specified row to the list.
public void Add(ListDialogRow row)
Parameters
rowListDialogRowThe row to add.
Exceptions
- ArgumentNullException
Thrown if
rowis null.
Add(string)
Adds a row to the list with the specified text.
public void Add(string text)
Parameters
textstringThe text of the row to add.
Exceptions
- ArgumentNullException
Thrown if
textis null.
Add(string, object?)
Adds a row to the list with the specified text and tag.
public void Add(string text, object? tag)
Parameters
textstringThe text of the row to add.
tagobjectThe tag of the row to add. The tag can be used so associate data with this row which can be used retrieved when the user responds to the dialog.
Exceptions
- ArgumentNullException
Thrown if
textis null.
GetEnumerator()
Returns an enumerator that iterates through the rows of this list dialog.
public IEnumerator<ListDialogRow> GetEnumerator()
Returns
- IEnumerator<ListDialogRow>
The enumerator that can be used to iterate through the rows of this list dialog.