Lou*_*uro 3 wpf datatemplate itemtemplateselector
ItemTemplateSelector应用于对象集合 - 例如ItemsControl.
单项控件是否有相同的功能?我想选择一个考虑对象内部值的数据模板.我可以为列表而不是单个项目执行此操作.
编辑:
在另一个屏幕中我有这个实现:
<ItemsControl ItemsSource="{Binding Path...} ItemTemplateSelector={...}
Run Code Online (Sandbox Code Playgroud)
问题是,现在我只有一个项目,但仍然希望有一个itemtemplateselector ...
编辑2:
出现的问题也可能是:我怎样才能在ItemsSource中只放一个项目?