WPF-specific bootstrap and runtime integration layer for the Dreamine MVVM framework.
➡️ 한국어 문서 보기
Overview
Dreamine.MVVM.Wpf contains the WPF-only startup and runtime wiring logic used by Dreamine MVVM applications.
This package is responsible for:
- View ↔ ViewModel registration
- automatic DI registration through DMContainer
- automatic DataContext attachment when a View is loaded
- keeping WPF runtime concerns out of platform-neutral libraries
Why this package exists
Dreamine.MVVM.Core should remain as platform-neutral as possible.
WPF-specific responsibilities such as FrameworkElement.Loaded, EventManager, and View runtime binding should not live in the core package. This package isolates those concerns into a dedicated WPF layer.
Main type
DreamineAppBuilder
The DreamineAppBuilder initializes the Dreamine MVVM runtime for a WPF application.
It performs the following steps:
- registers View ↔ ViewModel mappings
- auto-registers types into DMContainer
- hooks the WPF Loaded event to assign DataContext automatically when needed
Usage
Call DreamineAppBuilder.Initialize(...) once during application startup.
using System.Reflection;
using System.Windows;
namespace SampleApp;
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
}
}
Dreamine 앱 구동을 위한 초기화 도우미입니다.
static void Initialize(Assembly rootAssembly)
Dreamine MVVM WPF 런타임을 초기화합니다. View-ViewModel 자동 매핑, DI 자동 등록, Loaded 시점의 ViewModel 자동 주입을 구성합니다.
Project structure guideline
Recommended responsibility boundaries:
- Dreamine.MVVM.Core
- container
- command infrastructure
- platform-neutral MVVM runtime support
- Dreamine.MVVM.ViewModels
- Dreamine.MVVM.Locators
- ViewModel resolution and mapping logic
- Dreamine.MVVM.Wpf
- WPF startup/bootstrap/runtime integration
Target framework
- net8.0-windows
- WPF enabled
License
MIT License