The name ViewModel does not exist in the namespace “clr-namespace:Project.ViewModels”

前端 未结 18 1856
旧时难觅i
旧时难觅i 2020-12-04 23:55

Now that\'s a real strange error. I am working on a WPF application and following MVVM. In my MainWindow I am setting views and view models and I get this strange error. Alt

18条回答
  •  借酒劲吻你
    2020-12-05 00:35

    In my case implementation of IValueConverter was the problem

    I have changed:

    public object Convert(object value, 
      Type targetType, 
      object parameter, 
      string language) 
    { //code }
    

    to

    public object Convert(object value, 
      Type targetType, 
      object parameter, 
      System.Globalization.CultureInfo culture) 
    { //code } 
    

    ...rebuild project

提交回复
热议问题