Core library for QuietPrompts - A silent, non-intrusive prompt system for desktop applications
$ dotnet add package C1.QuietPrompts.CoreQuietPrompts is a silent, non-intrusive prompt system for desktop applications, split into two NuGet packages:
Core library containing interfaces, models, and base functionality for the QuietPrompts system.
<PackageReference Include="C1.QuietPrompts.Core" Version="1.0.1" />
dotnet add package C1.QuietPrompts.Core
Avalonia-based UI implementation with support for themes, background images, and sound.
<PackageReference Include="C1.QuietPrompts.UI" Version="1.0.1" />
dotnet add package C1.QuietPrompts.UI
using QuietPrompts.Core;
using QuietPrompts.UI.Services;
// Create the prompt service
var promptService = new AvaloniaPromptService();
// Show a simple information prompt
await promptService.ShowInformationAsync("Hello", "Welcome to QuietPrompts!");
var config = new PromptConfig
{
Title = "Custom Prompt",
Message = "Choose your action:",
Buttons = new List<PromptButton>
{
new() { Text = "Save", Result = PromptResult.Custom1, IsDefault = true },
new() { Text = "Cancel", Result = PromptResult.Cancel, IsCancel = true }
}
};
var result = await promptService.ShowPromptAsync(config);
var themedConfig = new PromptConfig
{
Title = "Styled Prompt",
Message = "This prompt has a custom theme and background!",
BackgroundImagePath = @"C:\path\to\your\image.jpg",
Theme = new PromptTheme
{
ForegroundColor = "White",
FontFamily = "Segoe UI",
FontSize = 16,
BackgroundColor = "#2D3748"
},
Position = PromptPosition.TopRight
};
var result = await promptService.ShowPromptAsync(themedConfig);
var soundConfig = new PromptConfig
{
Title = "Sound Prompt",
Message = "This plays a sound!",
Sound = PromptSound.Information, // System sound
// OR
SoundPath = @"C:\path\to\custom\sound.wav" // Custom sound file
};
var timedConfig = new PromptConfig
{
Title = "Auto-Close",
Message = "This will close automatically in 5 seconds",
AutoDismissAfter = TimeSpan.FromSeconds(5)
};
var config = new PromptConfig
{
Position = PromptPosition.TopRight, // TopRight, TopLeft, BottomRight, BottomLeft, Center
TopMost = true // Always on top
};
For complete documentation, examples, and API reference, visit the GitHub repository.
Both packages include symbol packages (.snupkg) for enhanced debugging experience:
Symbol packages are automatically available when debugging your application.
This project is licensed under the Corpi1 Software License (Based on Mozilla Public License 2.0).
You are free to use, modify, and distribute the software. Businesses and individuals can use it, including in commercial activities. However, you may not sell, repackage, or monetize the software itself.
See the LICENSE file for full terms.