Class AlertDialog
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class AlertDialog : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
AlertDialog
- Implements
- Inherited Members
Constructors
AlertDialog(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public AlertDialog(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
AlertDialog(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected AlertDialog(CreationData data)
Parameters
dataCreationData
AlertDialog(AlertDialogHandle)
protected AlertDialog(AlertDialogHandle handle)
Parameters
handleAlertDialogHandle
Fields
ButtonsPropertyDefinition
public static readonly Property<string[], AlertDialog> ButtonsPropertyDefinition
Field Value
CancelButtonPropertyDefinition
public static readonly Property<int, AlertDialog> CancelButtonPropertyDefinition
Field Value
DefaultButtonPropertyDefinition
public static readonly Property<int, AlertDialog> DefaultButtonPropertyDefinition
Field Value
DetailPropertyDefinition
public static readonly Property<string?, AlertDialog> DetailPropertyDefinition
Field Value
MessagePropertyDefinition
public static readonly Property<string?, AlertDialog> MessagePropertyDefinition
Field Value
ModalPropertyDefinition
public static readonly Property<bool, AlertDialog> ModalPropertyDefinition
Field Value
Properties
Buttons
public string[] Buttons { get; set; }
Property Value
- string[]
CancelButton
public int CancelButton { get; set; }
Property Value
DefaultButton
public int DefaultButton { get; set; }
Property Value
Detail
public string? Detail { get; set; }
Property Value
Message
public string? Message { get; set; }
Property Value
Modal
public bool Modal { get; set; }
Property Value
Methods
ChooseAsync(Window?)
public Task<int> ChooseAsync(Window? parent)
Parameters
parentWindow
Returns
ChooseFinish(AsyncResult)
[Version("4.10")]
public int ChooseFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
GetButtons()
[Version("4.10")]
public string[]? GetButtons()
Returns
- string[]
GetCancelButton()
[Version("4.10")]
public int GetCancelButton()
Returns
GetDefaultButton()
[Version("4.10")]
public int GetDefaultButton()
Returns
GetDetail()
[Version("4.10")]
public string GetDetail()
Returns
GetGType()
public static Type GetGType()
Returns
GetMessage()
[Version("4.10")]
public string GetMessage()
Returns
GetModal()
[Version("4.10")]
public bool GetModal()
Returns
NewFromPointer(nint, bool)
Creates a new managed AlertDialog instance for a given pointer.
public static AlertDialog NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new AlertDialog and sets the properties specified by the construct arguments.
public static AlertDialog NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetButtons(string[])
[Version("4.10")]
public void SetButtons(string[] labels)
Parameters
labelsstring[]
SetCancelButton(int)
[Version("4.10")]
public void SetCancelButton(int button)
Parameters
buttonint
SetDefaultButton(int)
[Version("4.10")]
public void SetDefaultButton(int button)
Parameters
buttonint
SetDetail(string)
[Version("4.10")]
public void SetDetail(string detail)
Parameters
detailstring
SetMessage(string)
[Version("4.10")]
public void SetMessage(string message)
Parameters
messagestring
SetModal(bool)
[Version("4.10")]
public void SetModal(bool modal)
Parameters
modalbool
Show(Window?)
[Version("4.10")]
public void Show(Window? parent)
Parameters
parentWindow