开发者

How to get Int32.MaxValue into a ItemsControl element

I am trying to put Int32.MaxValue into a ItemsControl using only XAML syntax using this markup:

<Grid xmlns:sys="clr-namespace:System;assembly=mscorlib">  
<ItemsControl HorizontalAlignment="Left">
  <sys:Int32>0</sys:Int32>
  <sys:Int32><x:Static Member="sys:Int32.MaxValue" /></sys:Int32>
</ItemsControl&g开发者_运维技巧t;

using Kaxaml, I get an error stating that System.Int32 doesn't have a content property. Is this possible? What am I doing wrong?


Try this:

<ItemsControl HorizontalAlignment="Left">
   <sys:Int32>0</sys:Int32>
   <x:Static Member="sys:Int32.MaxValue" />
</ItemsControl> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜