【发布时间】:2014-11-23 08:19:14
【问题描述】:
为什么这段代码会出错: 命名空间 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" 中不存在名称字典。
<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
【问题讨论】:
标签: wpf xaml dictionary