I am trying to start a MVVM pattern and I have this structure:
App.xaml:
<Application x:Class="StereoVisionApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:StereoVisionApp"
StartupUri="MainView.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<local:MainViewModel x:Key="StereoVisionApp.MainViewModel"/>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
MainViewModel.cs:
namespace StereoVisionApp.ViewModels
{
class MainViewModel
{
public MainViewModel()
{
}
}
}
I have an error on this line:
<local:MainViewModel x:Key="StereoVisionApp.MainViewModel"/>
Says:
The name "MainViewModel" does not exist in the namespace "clr-namespace:StereoVisionApp". StereoVisionApp C:\Users\Me\source\repos\StereoVisionApp\StereoVisionApp\App.xaml
I have tried restarting million times. any help?