UI Architecture
Overview
The UI layer of MiniMrpOrderCreation implements WPF with MVVM pattern, providing a rich desktop experience for inventory management and purchase order creation. The architecture emphasizes separation of concerns, data binding, and responsive user interfaces.
Technology Stack
- WPF: Windows Presentation Foundation for rich UI
- MVVM: Model-View-ViewModel pattern
- Data Binding: Two-way binding for reactive UI
- XAML: Declarative UI definition
- Material Design: Modern UI components
Component Hierarchy
MainWindow ├── MainView (Container) ├── WarehouseOrderingView (Primary workflow) ├── InvOrderingCompletionView (Results) └── Dialog Views ├── SupplierSelectionView ├── SalesOrderAllocationsView └── WipAllocationsView
Key Implementation Patterns
- View-First approach with dependency injection
- DataContext binding for ViewModels
- Command pattern for user actions
- Event aggregation for cross-component communication
- Resource dictionaries for styling
Best Practices
- Keep views thin, logic in ViewModels
- Use data templates for complex types
- Implement INotifyPropertyChanged properly
- Handle UI thread marshalling
- Dispose resources in Unloaded events