Class TwDialogInstance
Provides dialog content components with access to close or cancel the dialog they are hosted in.
public sealed class TwDialogInstance
- Inheritance
-
TwDialogInstance
- Inherited Members
Remarks
Receive this via a cascading parameter in a component shown through ITwDialogService:
[CascadingParameter] private TwDialogInstance? DialogInstance { get; set; }
Constructors
TwDialogInstance(ITwDialogReference)
Provides dialog content components with access to close or cancel the dialog they are hosted in.
public TwDialogInstance(ITwDialogReference reference)
Parameters
referenceITwDialogReference
Remarks
Receive this via a cascading parameter in a component shown through ITwDialogService:
[CascadingParameter] private TwDialogInstance? DialogInstance { get; set; }
Properties
Id
Gets the unique identifier of the dialog.
public Guid Id { get; }
Property Value
Methods
Cancel()
Closes the dialog as canceled.
public void Cancel()
Close()
Closes the dialog with a successful, empty result.
public void Close()
Close(TwDialogResult?)
Closes the dialog with the specified result.
public void Close(TwDialogResult? result)
Parameters
resultTwDialogResultThe result to return to the caller awaiting Result.
Close<T>(T)
Closes the dialog with a successful result carrying the specified data.
public void Close<T>(T data)
Parameters
dataTThe data to return.
Type Parameters
TThe type of the returned data.