{"id":29958080,"url":"https://github.com/noobnotfound/noobnotfound.winui.messagekit","last_synced_at":"2025-08-03T20:08:43.044Z","repository":{"id":307673504,"uuid":"1030361991","full_name":"NoobNotFound/NoobNotFound.WinUI.MessageKit","owner":"NoobNotFound","description":"A lightweight, customizable message dialog framework for WinUI 3 apps.","archived":false,"fork":false,"pushed_at":"2025-08-01T14:43:20.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-01T15:06:17.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NoobNotFound.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-01T14:04:50.000Z","updated_at":"2025-08-01T14:43:24.000Z","dependencies_parsed_at":"2025-08-01T15:06:20.045Z","dependency_job_id":"ee9449e4-39f4-4b9a-be7d-3b0179c7a5e7","html_url":"https://github.com/NoobNotFound/NoobNotFound.WinUI.MessageKit","commit_stats":null,"previous_names":["noobnotfound/noobnotfound.winui.messagekit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NoobNotFound/NoobNotFound.WinUI.MessageKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoobNotFound%2FNoobNotFound.WinUI.MessageKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoobNotFound%2FNoobNotFound.WinUI.MessageKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoobNotFound%2FNoobNotFound.WinUI.MessageKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoobNotFound%2FNoobNotFound.WinUI.MessageKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoobNotFound","download_url":"https://codeload.github.com/NoobNotFound/NoobNotFound.WinUI.MessageKit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoobNotFound%2FNoobNotFound.WinUI.MessageKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268604282,"owners_count":24276998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-03T20:08:38.541Z","updated_at":"2025-08-03T20:08:42.991Z","avatar_url":"https://github.com/NoobNotFound.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NoobNotFound.WinUI.MessageKit\n![NuGet Version](https://img.shields.io/nuget/v/NoobNotFound.WinUI.MessageKit)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/NoobNotFound/NoobNotFound.WinUI.MessageKit)\n![Static Badge](https://img.shields.io/badge/platform-windows10%2B-red)\n\nA modern, feature-rich message dialog framework for WinUI 3 applications. This library provides an elegant alternative to traditional message boxes with enhanced customization, theming, and user experience features.\n\nhttps://github.com/user-attachments/assets/f166f83c-4003-424d-a35f-edef73c584bb\n\n\n\n## Features\n\n- 🎨 **Modern WinUI 3 Design** - Seamlessly integrates with your app's theme\n- 🔊 **System Sounds** - Built-in sound effects for different message types\n- ⏱️ **Timeout Support** - Auto-dismiss dialogs after specified time\n- 🌐 **Localization Ready** - Easy text localization support  \n- 🎭 **Multiple Icons** - Information, Warning, Error, Question, Success, and Custom icons\n- 🔘 **Flexible Buttons** - Predefined button sets or fully custom buttons\n- 📱 **Queue Management** - Prevents dialog conflicts with built-in queueing\n- 🎯 **Response Metadata** - Track response times and additional context\n- 🎨 **Theme Aware** - Automatic light/dark theme support\n- ⚡ **Async/Await** - Modern async API throughout\n\n## Installation\n\nInstall via NuGet Package Manager:\n\n```\nInstall-Package NoobNotFound.WinUI.MessageKit\n```\n\nOr via .NET CLI:\n\n```\ndotnet add package NoobNotFound.WinUI.MessageKit\n```\n\n## Quick Start\n\n### Basic Setup\n\nFirst, configure the library in your `App.xaml.cs` or main window:\n\n```csharp\nusing NoobNotFound.WinUI.MessageKit;\n\n// Set the XamlRoot provider (usually in your MainWindow)\nCore.XamlRootProvider = () =\u003e MainWindow.Content.XamlRoot;\n\n// Optional: Configure theme provider\nCore.ThemeProvider = () =\u003e ActualTheme;\n\n// Optional: Configure localization\nCore.LocalizationProvider = text =\u003e ResourceManager.GetString(text);\n```\n\n### Simple Usage\n\n```csharp\n// Simple information message\nawait MessageBox.ShowAsync(\"Hello, World!\");\n\n// Message with title\nawait MessageBox.ShowAsync(\"Success\", \"Operation completed successfully!\");\n\n// Confirmation dialog\nvar response = await MessageBox.ShowConfirmationAsync(\n    \"Delete File\", \n    \"Are you sure you want to delete this file?\"\n);\n\nif (response.Result == MessageBoxResult.Yes)\n{\n    // User confirmed\n}\n```\n\n## Advanced Usage\n\n### Custom Options\n\n```csharp\nvar options = new MessageBoxOptions\n{\n    Title = \"Custom Dialog\",\n    Message = \"This is a custom message with advanced options.\",\n    Icon = MessageBoxIcon.Warning,\n    Buttons = MessageBoxButtons.YesNoCancel,\n    Sound = MessageBoxSound.Warning,\n    DefaultResult = MessageBoxResult.No,\n    Timeout = TimeSpan.FromSeconds(30),\n    Theme = ElementTheme.Dark,\n    MaxWidth = 500\n};\n\nvar response = await MessageBox.ShowAsync(options);\n```\n\n### Custom Buttons\n\n```csharp\nvar options = new MessageBoxOptions\n{\n    Title = \"Custom Actions\",\n    Message = \"Choose your action:\",\n    Buttons = MessageBoxButtons.Custom,\n    CustomButtons = new List\u003cCustomButton\u003e\n    {\n        new CustomButton \n        { \n            Text = \"Save\", \n            Result = MessageBoxResult.Custom1,\n            IsDefault = true \n        },\n        new CustomButton \n        { \n            Text = \"Save As...\", \n            Result = MessageBoxResult.Custom2 \n        },\n        new CustomButton \n        { \n            Text = \"Cancel\", \n            Result = MessageBoxResult.Cancel,\n            IsCancel = true \n        }\n    }\n};\n\nvar response = await MessageBox.ShowAsync(options);\n\nswitch (response.Result)\n{\n    case MessageBoxResult.Custom1:\n        // Handle Save\n        break;\n    case MessageBoxResult.Custom2:\n        // Handle Save As\n        break;\n    case MessageBoxResult.Cancel:\n        // Handle Cancel\n        break;\n}\n```\n\n### With Timeout and Metadata\n\n```csharp\nvar options = new MessageBoxOptions\n{\n    Title = \"Timed Message\",\n    Message = \"This dialog will auto-close in 10 seconds.\",\n    Icon = MessageBoxIcon.Information,\n    Timeout = TimeSpan.FromSeconds(10),\n    DefaultResult = MessageBoxResult.OK\n};\n\noptions.WithMetadata(\"UsageContext\", \"AutoSave\")\n       .WithMetadata(\"Cache\", true);\n\nvar response = await MessageBox.ShowAsync(options);\n\nif (response.TimedOut)\n{\n    // Handle timeout\n    Console.WriteLine($\"Dialog timed out after {response.ResponseTime}\");\n}\n```\n\n### Custom Icons\n\n```csharp\nvar options = new MessageBoxOptions\n{\n    Title = \"Custom Icon\",\n    Message = \"This dialog uses a custom icon.\",\n    Icon = MessageBoxIcon.Custom,\n    CustomIconPath = \"ms-appx:///Assets/my-icon.png\"\n};\n\nawait MessageBox.ShowAsync(options);\n```\n\n## Predefined Methods\n\nThe library includes several convenience methods for common scenarios:\n\n```csharp\n// Information message\nawait MessageBox.ShowAsync(\"Info message\");\n\n// Error message\nawait MessageBox.ShowErrorAsync(\"Error\", \"Something went wrong!\");\n\n// Warning message  \nawait MessageBox.ShowWarningAsync(\"Warning\", \"Please review your input.\");\n\n// Confirmation dialog\nvar confirmed = await MessageBox.ShowConfirmationAsync(\n    \"Confirm Action\", \n    \"Do you want to continue?\"\n);\n```\n\n## Configuration Options\n\n### MessageBoxOptions Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `Title` | string | Dialog title text |\n| `Message` | string | Main message content |\n| `Buttons` | MessageBoxButtons | Button configuration |\n| `Icon` | MessageBoxIcon | Icon type to display |\n| `Sound` | MessageBoxSound | Sound to play |\n| `DefaultResult` | MessageBoxResult | Default button/result |\n| `Timeout` | TimeSpan? | Auto-close timeout |\n| `Theme` | ElementTheme? | Light/Dark theme override |\n| `MaxWidth` | double | Maximum dialog width |\n| `MaxHeight` | double | Maximum dialog height |\n| `CustomIconPath` | string | Path for custom icons |\n| `CustomButtons` | List\u003cCustomButton\u003e | Custom button definitions |\n| `Metadata` | Dictionary\u003cstring, object\u003e | Additional data |\n\n### Enums\n\n**MessageBoxButtons**\n- `OK` - Single OK button\n- `OKCancel` - OK and Cancel buttons  \n- `YesNo` - Yes and No buttons\n- `YesNoCancel` - Yes, No, and Cancel buttons\n- `RetryCancel` - Retry and Cancel buttons\n- `AbortRetryIgnore` - Abort, Retry, and Ignore buttons\n- `Custom` - Use CustomButtons collection\n\n**MessageBoxIcon**\n- `None` - No icon\n- `Information` - Information icon (blue)\n- `Warning` - Warning icon (orange)\n- `Error` - Error icon (red)\n- `Question` - Question icon (blue)\n- `Success` - Success icon (green)\n- `Custom` - Custom icon from path\n\n**MessageBoxResult**\n- `None`, `OK`, `Cancel`, `Yes`, `No`, `Retry`, `Ignore`, `Abort`\n- `Custom1`, `Custom2`, `Custom3` - For custom buttons\n- `Timeout` - Dialog timed out\n- `Error` - An error occurred\n\n## Response Information\n\nThe `MessageBoxResponse` object provides detailed information about user interaction:\n\n```csharp\nvar response = await MessageBox.ShowAsync(options);\n\nConsole.WriteLine($\"Result: {response.Result}\");\nConsole.WriteLine($\"Response Time: {response.ResponseTime}\");\nConsole.WriteLine($\"Timed Out: {response.TimedOut}\");\n\n// Access custom metadata\nif (response.Metadata.ContainsKey(\"CustomData\"))\n{\n    var data = response.Metadata[\"CustomData\"];\n}\n```\n\n## Queue Management\n\nThe library automatically queues dialogs to prevent conflicts. For immediate display without queueing:\n\n```csharp\n// Queued (default behavior)\nvar response1 = await MessageBox.ShowAsync(options);\n\n// Immediate (no queue)\nvar response2 = await MessageBox.ShowImmediateAsync(options);\n```\n\n## Extension Methods\n\nFluent API for easier configuration:\n\n```csharp\nvar options = new MessageBoxOptions\n{\n    Title = \"Example\",\n    Message = \"Fluent configuration example\"\n}\n.WithTimeout(TimeSpan.FromSeconds(15))\n.WithIcon(MessageBoxIcon.Question)\n.WithSound(MessageBoxSound.Question)\n.WithMetadata(\"Source\", \"FluentExample\");\n```\n\n## Error Handling\n\n```csharp\ntry \n{\n    var response = await MessageBox.ShowAsync(options);\n    // Handle response\n}\ncatch (Exception ex)\n{\n    // Handle any errors\n    Console.WriteLine($\"MessageBox error: {ex.Message}\");\n}\n```\n\n## Best Practices\n\n1. **Always set XamlRootProvider** in your app initialization\n2. **Use appropriate icons** for different message types\n3. **Set reasonable timeouts** for auto-dismissing dialogs\n4. **Handle timeout scenarios** in your application logic\n5. **Use confirmation dialogs** for destructive actions\n6. **Leverage metadata** for tracking and analytics\n7. **Configure localization** for multi-language apps\n\n## Requirements\n\n- .NET 8.0 or later\n- Windows 10 version 1809 (build 17763) or later\n- WinUI 3 / Windows App SDK\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues, feature requests, or pull requests.\n\n## License\n\nThis project is licensed under the GNU Public License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoobnotfound%2Fnoobnotfound.winui.messagekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoobnotfound%2Fnoobnotfound.winui.messagekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoobnotfound%2Fnoobnotfound.winui.messagekit/lists"}