๐Ÿงฉ 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:

  • TerminalViewer is IDisposable โ€” call Dispose() from your view's Unloaded handler so the background pump can complete cleanly.
  • ApplicationMonitorView and ZoomBox register on Loaded and unregister on Unloaded automatically; you don't need to do anything.
  • Messenger holds recipients via WeakReference, so a missed unregister is not a classic GC leak โ€” but the recipient may keep receiving messages until the next Messenger.Cleanup() cycle.

๐Ÿ“š See also