We have used WPFToolKit and PresentationFramework 4.0 in our project. There are some common namespaces in both the dlls(assemblies).To resolve the namespace conflicts, we gave an Alias to WPFToolKit, that helped in code behind(.cs files)
Now in our XAML files, how do we specify the alias.
WPFToolKit DataGrid is not recognized
Error : The type or namespace name 'Controls' does not exist in the namespace 'Microsoft.Windows' (are you missing an assembly reference?)
XAML namespace code
xmlns:WpfToolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
XAML DataGrid
<WpfToolkit:DataGrid Name="BlotterGrid" />
The build errors got resolved by using Alias as "global,MyAlias" rather than "MyAlias". Thus in code file external alias "MyAlias" is used whereas in XAML global is used.
Reference : http://social.msdn.microsoft.com/Forums/da-DK/vseditor/thread/87f0caa0-c57a-4146-a999-c794947ae28e
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