What problem does it solve?
Reference guide for Gum's dialog/popup systems. Load this when working on dialog windows, DialogService, DialogWindow, DeleteOptionsWindow, dialog scrolling, dialog layout, or adding new dialog types.
Core Features & Use Cases
- Two Separate Systems: DialogService (MVVM) handles message popups, confirmations, text input, choice selection, plugin management, and import dialogs; DeleteOptionsWindow is standalone for delete confirmations with plugin-injected options.
- Flow and behavior: DialogService creates a DialogWindow, sets its DataContext to a view model, uses a DialogTemplateSelector to resolve the view, and binds attached properties from the view to the Dialog control after load.
- Key concepts: View resolution (mapping FooViewModel to FooView), window sizing (SizeToContent then manual), and attached properties like DialogTitle, DialogActions, DialogAuxiliaryActions, Dialog.ScrollContent.
- Standalone DeleteOptionsWindow: Code-behind with a MainStackPanel that plugins can modify; separate from DialogService; not MVVM.
- Common pitfalls: Do not modify DialogWindow to affect the delete dialog; ensure you know which system shows the dialog; dialog scrolling issues and the need to adjust ScrollContent.
Quick Start
Consult this guide when implementing or debugging Gum's dialog systems to ensure consistent DialogService and DeleteOptionsWindow behavior.