InputDialog 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package InputDialog --version 1.0.2
                    
NuGet\Install-Package InputDialog -Version 1.0.2
                    
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="InputDialog" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InputDialog" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="InputDialog" />
                    
Project file
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 InputDialog --version 1.0.2
                    
#r "nuget: InputDialog, 1.0.2"
                    
#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 InputDialog@1.0.2
                    
#: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=InputDialog&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=InputDialog&version=1.0.2
                    
Install as a Cake Tool

Input Dialog

Input Dialog is a simple .net 6-windows, Winforms Input dialog in a nuget package.

https://www.nuget.org/packages/InputDialog/

Usage

(See the sample usage app in GitHub - https://github.com/rkreisel/InputDialog)

    private void btnSimpleTextInput_Click(object sender, EventArgs e)
    {
        var rslt = InputDialog.InputDialog.ShowDialog(
            "Enter text",
            "Title",
            InputDialog.InputDialog.IDIcon.Question,
            InputDialog.InputDialog.IDButton.OkCancel,
            InputDialog.InputDialog.IDType.TextBox);
        if (rslt.DialogResult == DialogResult.OK)
            ShowResult(rslt.ResultText);
    }

    private void btnDefaultInput_Click(object sender, EventArgs e)
    {
        var rslt = InputDialog.InputDialog.ShowDialog(
            "Enter text", 
            "Title", 
            InputDialog.InputDialog.IDIcon.Question, 
            InputDialog.InputDialog.IDButton.OkCancel, 
            InputDialog.InputDialog.IDType.TextBox, 
            defaultText: "Default Text");
        if (rslt.DialogResult == DialogResult.OK)
            ShowResult(rslt.ResultText);
    }

    private void btnChangeButtonName_Click(object sender, EventArgs e)
    {
        var rslt = InputDialog.InputDialog.ShowDialog(
            "Enter text", 
            "Title", 
            InputDialog.InputDialog.IDIcon.Question, 
            InputDialog.InputDialog.IDButton.OkCancel, 
            InputDialog.InputDialog.IDType.TextBox, 
            buttonTexts: new ButtonTexts { OKText = "Do It" });
        if (rslt.DialogResult == DialogResult.OK)
            ShowResult(rslt.ResultText);
    }

    private void btnSimpleMsgBox_Click(object sender, EventArgs e)
    {
        var rslt = InputDialog.InputDialog.ShowDialog(
            "This is the message.", 
            "Title", 
            InputDialog.InputDialog.IDIcon.Question,
            InputDialog.InputDialog.IDButton.OkCancel);
    }

    private void btnComboBox_Click(object sender, EventArgs e)
    {
        var rslt = InputDialog.InputDialog.ShowDialog(
            "This is the message.", 
            "Title", 
            InputDialog.InputDialog.IDIcon.Question,
            InputDialog.InputDialog.IDButton.OkCancel, 
            type: InputDialog.InputDialog.IDType.ComboBox, 
            listItems: new List<string> { "Item 1", "Item2", "Item 3" });
        if (rslt.DialogResult == DialogResult.OK)
            ShowResult(rslt.ResultText);
    }

    private void btnComboBoxWithError_Click(object sender, EventArgs e)
    {
        var rslt = InputDialog.InputDialog.ShowDialog(
            "This is the message.", 
            "Title", 
            InputDialog.InputDialog.IDIcon.Question, 
            InputDialog.InputDialog.IDButton.OkCancel, 
            type: InputDialog.InputDialog.IDType.ComboBox);
        if (rslt.DialogResult == DialogResult.OK)
            ShowResult(rslt.ResultText);
    }
    private static void ShowResult(string rslt)
    {
        MessageBox.Show(rslt, "InputDialog Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net9.0-windows 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.
  • net6.0-windows7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on InputDialog:

Package Downloads
TextViewer

A simple popup text file viewer in a Nuget package. Version 1.0.4 adds XML comments.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.0 266 8/21/2025
1.3.1 641 1/28/2024
1.3.0 585 1/3/2024
1.2.9 593 12/14/2023
1.2.8 571 12/8/2023
1.2.7.1 589 12/8/2023
1.2.7 541 12/8/2023
1.2.6.1 521 12/8/2023
1.2.6 550 12/7/2023
1.2.5.1 566 12/7/2023
1.2.5 542 12/7/2023
1.2.4 1,069 3/8/2022
1.2.3 929 2/26/2022
1.2.2 876 2/26/2022
1.2.1 903 2/13/2022
1.2.0 875 2/5/2022
1.0.2 916 2/3/2022
1.0.1.1 915 1/25/2022
1.0.1 896 1/24/2022
1.0.0.5 891 1/23/2022
1.0.0 917 1/23/2022