在学习WPF过程中发现现在的很多例子都是在Jan CTP的环境下写的,和FEB的环境不能直接运行,首先就是namespace报错,下面列举一下WINFX FEB CTP 的 Namespace和以前版本的对应关系:
OLD
http://schemas.microsoft.com/winfx/avalon/2005
NEW
http://schemas.microsoft.com/winfx/2006/xaml/presentation
OLD
http://schemas.microsoft.com/winfx/xaml/2005
NEW
http://schemas.microsoft.com/winfx/2006/xaml
OLD
http://schemas.microsoft.com/winfx/2005/06/markup-compatibility
NEW
http://schemas.openxmlformats.org/markup-compatibility/2006
OLD
http://schemas.microsoft.com/expression/interactivedesigner/2005
NEW
http://schemas.microsoft.com/expression/interactivedesigner/2006
另外Mapping一个CLR namespace到XML namespace也做了改变,Mapping的语法已经不需要再使用了。
Mapping PI for same assembly
OLD
<?Mapping XmlNamespace=”local” ClrNamespace=”MyCompany.MyProduct” ?>
<… xmlns:my=”local” >
NEW
<… xmlns:my=”clr-namespace:MyCompany.MyProduct” >
Mapping PI for different assembly
OLD
<?Mapping XmlNamespace=”local” ClrNamespace=”MyCompany.MyProduct” Assembly=”someDLL” ?>
<… xmlns:my=”local” >
NEW
<… xmlns:my=”clr-namespace:MyCompany.MyProduct;assembly=someDLL” >
For fully specified assembly names, follow the syntax outlined here: http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyname.aspx