๐งฉ Composite Components
The Atc.Wpf.Components library provides higher-level composite components built on top of the primitives in Atc.Wpf.Controls and the labelled fields in Atc.Wpf.Forms. These are feature-complete units you drop into an application โ dialogs, viewers, monitoring panels, notifications, settings, and the zoom browser.
๐ Namespace
using Atc.Wpf.Components;
๐ What's in the box
| Category | Highlights | Path |
|---|---|---|
| Dialogs | InfoDialogBox, QuestionDialogBox, InputDialogBox, InputFormDialogBox, BasicApplicationSettingsDialogBox, ExceptionDialog |
Dialogs/ |
| Viewers | JsonViewer, TerminalViewer, MarkdownViewer |
Viewers/ |
| Monitoring | ApplicationMonitorView (memory, CPU, GC counters with copy-to-clipboard context menu) |
Monitoring/ |
| Notifications | ToastNotification system + manager |
Notifications/ |
| Progressing | BusyIndicatorService, BusyIndicatorManager |
Progressing/ |
| Printing | VisualPaginator for paginated print output |
Printing/ |
| Settings | Reusable settings panels | Settings/ |
| Zoom | ZoomBrowser (multi-zoom orchestration around ZoomBox) |
Zoom/ |
| Flyouts | Flyout controls |
Flyouts/ |
๐ Common patterns
Dialog box
var dialog = new InfoDialogBox(
Application.Current.MainWindow!,
new DialogBoxSettings(DialogBoxType.Ok),
"Hello to InfoDialogBox method");
dialog.Show();
Unhandled exceptions
// UI thread: themed dialog with the full report under Details, Ctrl+C or the copy button copies it.
Current.DispatcherUnhandledException += (_, e) =>
{
if (ExceptionReport.IsKnownHarmlessWpfBindingError(e.Exception))
{
e.Handled = true;
return;
}
ExceptionDialog.Show(e.Exception, "Dispatcher Unhandled Exception");
e.Handled = true;
Shutdown(-1);
};
// Other threads: the process ends, so use the native message box (no UI thread needed).
AppDomain.CurrentDomain.UnhandledException += (_, e) =>
{
if (e.ExceptionObject is Exception ex)
{
_ = ExceptionReport.ShowMessageBox(ex, "CurrentDomain Unhandled Exception");
}
};
See ExceptionDialog_Readme.md.
Toast notification
ToastNotificationManager.Show(
title: "Saved",
message: "Your settings were saved.",
type: ToastNotificationType.Success);
Application monitor
<components:ApplicationMonitorView />
The view ships with a context menu (right-click) that copies a single counter or the full snapshot to the clipboard.
๐งน Lifetime & cleanup
Several components subscribe to Atc.XamlToolkit.Messaging.Messenger and/or hold timers:
TerminalViewerisIDisposableโ callDispose()from your view'sUnloadedhandler so the background pump can complete cleanly.ApplicationMonitorViewandZoomBoxregister onLoadedand unregister onUnloadedautomatically; you don't need to do anything.Messengerholds recipients viaWeakReference, so a missed unregister is not a classic GC leak โ but the recipient may keep receiving messages until the nextMessenger.Cleanup()cycle.
๐ See also
- Per-component readme files live next to the source: e.g.
InputDialogBox_Readme.md,ApplicationMonitorView_Readme.md,ToastNotification_Readme.md. - Underlying form fields:
docs/Forms/@Readme.md - Underlying primitives:
src/Atc.Wpf.Controls/