相关疑难解决方法(0)

在xaml中创建一个字典?

伪示例:

<Window>
  <Window.Tag>
    <x:Dictionary KeyType="{x:Type sys:String}" ValueType="{x:Type sys:Int32}">
        <sys:DictionaryEntry Entry="{sys:DictionaryEntry Key0, 000}"/>
        <sys:DictionaryEntry Key="key1" Value="111"/>
        <sys:DictionaryEntry>
          <sys:DictionaryEntry.Key>
            <sys:String>Key2<sys:String>
          </sys:DictionaryEntry.Key>          
          <sys:DictionaryEntry.Value>
            <sys:Int32>222</sys:Int32>            
          </sys:DictionaryEntry.Value>
        </sys:DictionaryEntry>
    </x:Dictionary />    
  </Window.Tag>
</Window>
Run Code Online (Sandbox Code Playgroud)

xaml dictionary idictionary key-value

21
推荐指数
4
解决办法
2万
查看次数

标签 统计

dictionary ×1

idictionary ×1

key-value ×1

xaml ×1