Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The property 'IsDataSource' was not found in type 'ViewModelLocator

I have the following code:

<UserControl x:Class="TestApp.View.ViewAlarmLog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Custom="http://schemas.microsoft.com/wpf/2008/toolkit"  
 xmlns:mvvm="clr-namespace:Test.ViewModel">
<UserControl.Resources>
    <ResourceDictionary  >
        <ResourceDictionary.MergedDictionaries>
        </ResourceDictionary.MergedDictionaries>
        <mvvm:ViewModelLocator x:Key="Locator" d:IsDataSource="True"/>
  </ResourceDictionary>
 </UserControl.Resources>

the problem is dat i always get an error: The property 'IsDataSource' was not found in type 'ViewModelLocator'. "

What could be the problem here ?

Redgards Dieter

like image 422
user183638 Avatar asked Nov 30 '09 20:11

user183638


1 Answers

I think the IsDataSource attribute is specific to Expression Blend. Other editors, like Visual Studio, won't be able to understand it.

You can fix this problem by instructing the editor to ignore this attribute.

Try adding the following attributes to the UserControl element:

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    
mc:Ignorable="d"
like image 50
dthrasher Avatar answered Oct 10 '22 20:10

dthrasher