0
为什么此代码给出错误: 名称空间xmlns中不存在名称字典:scg =“clr-namespace:System.Collections.Generic; assembly = mscorlib”。在xaml代码中创建字典
<Window x:Class="Test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:test="clr-namespace:Test"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<scg:Dictionary x:Key="CountryPopulRecords" TypeArguments="sys:String,sys:String"></scg:Dictionary>
</Window.Resources>
<Grid>
</Grid>
</Window>
参考:MSDN
我已经使用基于此MSDN链接的代码:[link](http://msdn.microsoft.com/en-us/library/ms750476(v = vs.110).aspx) – AnjumSKhan 2014-11-23 10:53:19
你有没有读过整个文章? (我的链接和你的链接)? – ZSH 2014-11-23 11:04:12