canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.
MIT License
988 stars 143 forks source link

Unable to find a View with type MyApplication.Views.First.OneView #150

Closed FaustPipeDream closed 4 years ago

FaustPipeDream commented 4 years ago

I'm using WindowManager.ShowWindow open a new window. At first, It work fine,But after I change the namespace of the OneViewModel from MyApplication.ViewModels to MyApplication.ViewModels.First. this error occur,And it work again after the namespace back to MyApplication.ViewModels

FaustPipeDream commented 4 years ago

I found the ViewModel can't change namespace after create, but why?

canton7 commented 4 years ago

The name and namespace of the View has to match the ViewModel. Please read this doc

FaustPipeDream commented 4 years ago

The name and namespace of the View has to match the ViewModel. Please read this doc

Yeah, That's a namespace problem,I see. The namespace of the View is not match the VeiwMdel.Thank you.