开发者

How to set IsItemsHost in Silverlight

In WPF Panel.IsItemsHost is set-get property. In Silverlight - get only, why I can simulate this in Silverlight? Using in WPF code:

<Setter Property="ItemsPanel">
     <Setter.Value>
         <ItemsPanelTemplate>
             <StackPanel IsItemsHost="True" Orientation="Horizontal" />开发者_StackOverflow中文版
         </ItemsPanelTemplate>
     </Setter.Value>
</Setter>


It was necessary in a previous version of Silverlight to set IsItemsHost="True" for a panel in an ItemsControl.ItemsPanelTemplate.

Now the Silverlight controls library fortunately can discover that automatically. One could think that was a no-brainer actually anyway. :->

I don't know if/when WPF will adapt that behavior as well.


Question closed. In ItemsPanelTemplate not neccesary using IsItemHost.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜