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
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With