Error 2 Cannot create an instance of "TreeView". C:\tfs\GenOn\MyControls.Controls\MyControls.Controls.xxxInformation\xxxInform.xaml 29 13 MyControls.Controls.xxxInformation
The line <my1:TreeView x"Name="trvTreeView" Margin="0,5,0,0" /> is where the error occurs. Sometimes I can fix this by Rebuild All. Sometimes I have to delete generated code. Is there a way to fix this for good? Is it a bug in Visual Studio?
<
UserControl
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"MyControls.Controls.xxxInform"
xmlns:telerikInput
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:telerikgrid
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:my1
=
"clr-namespace:MyControls.Controls;assembly=MyControls.Controls.TreeView"
xmlns:my3
=
"clr-namespace:Telerik.Windows.QuickStart.Animation;assembly=Telerik.Windows.QuickStart"
xmlns:ViewModels
=
"clr-namespace:MyControls.Controls.ViewModels"
xmlns:Globalization
=
"clr-namespace:System.Globalization;assembly=mscorlib"
mc:Ignorable
=
"d"
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"250"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"5"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"710"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"700"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<!--<RowDefinition Height="5"></RowDefinition>-->
<
RowDefinition
Height
=
"530"
></
RowDefinition
>
<
RowDefinition
Height
=
"530"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
Border
BorderBrush
=
"Black"
BorderThickness
=
"2"
>
<
my1:TreeView
x:Name
=
"trvTreeView"
Margin
=
"0,5,0,0"
/>
</
Border
>
<!-- Further details elided -->