building-mewui-apps

Creates MewUI desktop applications with windows, controls, theming, and dialogs in C#.

Updated Nov 22, 2023
One-click install
npx skills add https://github.com/parksanghoon-sys/TestCode --skill building-mewui-apps-parksanghoon-sys
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: building-mewui-apps
Source: https://github.com/parksanghoon-sys/TestCode/tree/main/src/Modbus/.agents/skills/building-mewui-apps
Command: npx skills add https://github.com/parksanghoon-sys/TestCode --skill building-mewui-apps-parksanghoon-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building desktop UIs with the MewUI framework requires knowing its specific fluent API conventions, which differ from WPF and other C# UI frameworks (e.g., no ShowDialog(), no Closing event, Action-based events instead of EventHandler). This Skill provides the correct patterns so generated MewUI code compiles and behaves as expected. ## Core Features & Use Cases - Application & Window Setup: Configure Application.Run(), graphics backends, window sizing helpers, and multi-window management with correct MewUI semantics. - Controls, Theming & Layout: Use built-in controls (Label, TextBox, Button, ComboBox, Slider, etc.), Theme.Palette/Metrics access, fluent styling, and DockPanel layout patterns. - Dialogs & Popups: Implement MessageBox, file dialogs, context menus, and custom dialog windows using MewUI's non-modal window model. - Use Case: When scaffolding a new C# desktop tool with MewUI, generate a main window with a menu, toolbar, sidebar, and status bar, plus a confirmation dialog, all using the correct fluent API calls. ## Quick Start Create a new MewUI application with a main window containing a docked toolbar, a list of items, and a confirmation dialog using the correct fluent API.

Frequently Asked Questions about building-mewui-apps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a MewUI application window in C#?▼

Create a Window with the fluent API, set Title, Width, Height, and Content, then call the static Application.Run(window) method. Optionally set Application.DefaultGraphicsBackend to Direct2D, Gdi, or OpenGL before Run().

How do I show a modal dialog in MewUI?▼

MewUI does not have ShowDialog(); all windows are non-modal. Create a custom Window subclass for the dialog, call Show(), and handle the result through the Closed event or a property set before Close().

Does MewUI support data binding on controls?▼

Yes, controls provide Bind methods such as BindText, BindIsChecked, BindSelectedIndex, and BindValue that accept observables. For example, use new TextBox().BindText(observable) or new Slider().BindValue(observable).

How do I update the MewUI UI from a background thread?▼

Use Application.Current.Dispatcher with Post() for asynchronous updates or Send() for synchronous calls. Check IsOnUIThread first; there are no InvokeAsync() or CheckAccess() methods in MewUI.

Why is my MewUI window Closing event not firing?▼

MewUI has no cancellable Closing event; only Closed exists, which fires after the window closes. Window events use plain Action delegates rather than the (sender, args) EventHandler pattern.