Goo.NativeDialogs
0.11.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Goo.NativeDialogs --version 0.11.0
NuGet\Install-Package Goo.NativeDialogs -Version 0.11.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Goo.NativeDialogs" Version="0.11.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Goo.NativeDialogs" Version="0.11.0" />
<PackageReference Include="Goo.NativeDialogs" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Goo.NativeDialogs --version 0.11.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Goo.NativeDialogs, 0.11.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Goo.NativeDialogs@0.11.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Goo.NativeDialogs&version=0.11.0
#tool nuget:?package=Goo.NativeDialogs&version=0.11.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Native message boxes
let result = await NativeDialogs.ShowMessageBoxAsync(window, MessageBoxOptions{
Title: "Save changes?",
Message: "Save this document before closing?",
Buttons: []MessageBoxButton{
MessageBoxButton{ Id: 1, Text: "Save" },
MessageBoxButton{ Id: 2, Text: "Discard" },
},
})
if result.Status == MessageBoxStatus.Success {
SaveOrDiscard(result.ButtonId)
}
Reference optional Goo.NativeDialogs. Call from the open owner's Goo UI thread. Options are copied before launch.
| Platform | Behavior |
|---|---|
| Windows and macOS | SDL_ShowMessageBox uses the owner window. Native display blocks Goo rendering, timers and posted actions until dismissal. |
| Wayland | Unsupported. SDL's zenity backend does not parent the box to its owner. |
| Android | An owned AlertDialog. Up to three buttons. Explicit Return or Escape defaults return Unsupported. The main thread does not block. |
- Use one to eight buttons with unique nonnegative IDs. Text must not contain NUL.
- Set at most one
Defaultbutton for Return and oneCancelbutton for Escape on desktop. - A click on a
Cancelbutton returnsSuccesswith its ID. Dismissal without a selection returnsCancelled. ButtonIdis-1outsideSuccess.Failedincludes a copied native error.- The owner stays alive and blocks Goo input and accessibility actions until completion. A conflicting modal operation returns
Busy. - Owner close before launch returns
OwnerClosedwithout display. A pending desktop close completes after SDL returns, before later queued actions. - Android owner detach, disposal or Activity destruction closes the box and returns
OwnerClosed. - Focus returns only to a mounted target while the owner is visible and focused.
Generate the API reference locally:
dotnet run --project tools/Goo.ApiDocs/Goo.ApiDocs.csproj -c Release -- \
--source Goo.NativeDialogs \
--xml Goo.NativeDialogs/bin/Release/net10.0/Goo.NativeDialogs.xml \
--output docs/api-native-dialogs
Build the package first. Set GooBuildAndroid=true to build both targets. The Android target needs the Android workload.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Goo (>= 0.11.0)
-
net10.0-android36.0
- Goo (>= 0.11.0)
- Goo.Android (>= 0.11.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.