Dreamine.MVVM.Locators.Wpf 1.0.6

dotnet add package Dreamine.MVVM.Locators.Wpf --version 1.0.6
                    
NuGet\Install-Package Dreamine.MVVM.Locators.Wpf -Version 1.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dreamine.MVVM.Locators.Wpf" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dreamine.MVVM.Locators.Wpf" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Dreamine.MVVM.Locators.Wpf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dreamine.MVVM.Locators.Wpf --version 1.0.6
                    
#r "nuget: Dreamine.MVVM.Locators.Wpf, 1.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dreamine.MVVM.Locators.Wpf@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dreamine.MVVM.Locators.Wpf&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Dreamine.MVVM.Locators.Wpf&version=1.0.6
                    
Install as a Cake Tool

Dreamine.MVVM.Locators.Wpf

WPF integration layer for the Dreamine MVVM locator system.

This package extends Dreamine.MVVM.Locators with WPF-specific runtime helpers for:

  • automatic View ↔ ViewModel binding
  • View resolution from ViewModel instances
  • region-based content navigation
  • ContentControl-based navigation hosting

It is designed for WPF applications that want lightweight locator-based composition without introducing a heavy framework.

➡️ 한국어 문서 보기


Purpose

Dreamine.MVVM.Locators.Wpf provides the WPF runtime bridge between:

  • Dreamine.MVVM.Locators
  • WPF FrameworkElement
  • XAML attached properties
  • region/content navigation patterns

This package is responsible for connecting Views and ViewModels at runtime in a WPF-friendly way.


Key Components

ViewModelBinder

WPF attached-property helper for automatic ViewModel wiring.

Responsibilities:

  • exposes AutoWireViewModel attached property
  • resolves ViewModel by using ViewModelLocator.Resolve(view.GetType())
  • assigns resolved ViewModel to DataContext
  • resolves View instances from ViewModel instances using naming conventions

Example:

<Window
    xmlns:locator="clr-namespace:Dreamine.MVVM.Locators.Wpf"
    locator:ViewModelBinder.AutoWireViewModel="True">
</Window>

RegionBinder

Attached-property-based region registry for ContentControl.

Responsibilities:

  • registers ContentControl instances by region name
  • navigates by region key
  • resolves View from ViewModel through ViewModelBinder.ResolveView

Example:

<ContentControl
    local:RegionBinder.RegionName="MainRegion" />
RegionBinder.Navigate("MainRegion", viewModel);

ContentControlNavigator

Simple INavigator implementation for ContentControl.

Responsibilities:

  • resolves a View from a ViewModel
  • assigns the resolved View to ContentControl.Content

Example:

var navigator = new ContentControlNavigator(MainContentControl);
navigator.Navigate(viewModel);

View Resolution Rules

ViewModelBinder.ResolveView(object viewModel) tries multiple naming patterns.

Examples of supported conversions include:

  • ViewModelsViews
  • ViewModelView
  • ViewModel → empty string
  • ViewModelsPages
  • PageModelsPages
  • PageModelPage

This allows the package to work with several WPF naming styles.


Requirements

  • .NET 8.0
  • WPF enabled
  • Reference to Dreamine.MVVM.Locators

Installation

dotnet add package Dreamine.MVVM.Locators.Wpf

Or add it directly to your project file:

<PackageReference Include="Dreamine.MVVM.Locators.Wpf" Version="1.0.3" />

Architecture Role

This package belongs to the WPF integration layer of the Dreamine MVVM stack.

Dreamine.MVVM.Locators
        ↓
Dreamine.MVVM.Locators.Wpf
        ↓
WPF Views / Regions / Navigation

When to Use

Use this package when:

  • you are building a WPF application with Dreamine MVVM
  • you want automatic ViewModel binding from XAML
  • you want to resolve a View from a ViewModel dynamically
  • you need lightweight region/content navigation without a large framework

Do not use this package outside WPF.


License

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Dreamine.MVVM.Locators.Wpf:

Package Downloads
Dreamine.MVVM.Extensions

Common extension utilities for Dreamine MVVM, including LINQ, ICommand, and observable helpers.

Dreamine.MVVM.FullKit

All-in-one package for Dreamine MVVM on WPF. Includes core MVVM modules and automatic source generator integration.

Dreamine.MVVM.Wpf

WPF-specific bootstrap and runtime integration layer for the Dreamine MVVM framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.6 131 4/30/2026
1.0.5 119 3/24/2026
1.0.4 147 3/21/2026
1.0.3 187 5/31/2025
1.0.2 217 5/26/2025
1.0.1 216 5/25/2025
1.0.0 229 5/25/2025