WPF 数据模板教程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22688068/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WPF DataTemplate Tutorials
提问by Marco BFV
I am stuck in how to use DataTamplete in WPF, someone knows some tutorial or has a colection of turorials that teach how to use it??
我被困在如何在 WPF 中使用 DataTamplete,有人知道一些教程或有教如何使用它的教程集?
I'm using MVVM Pattern, so if you know a tutorial in mvvm examples it will be better. ;)
我正在使用 MVVM 模式,所以如果你知道 mvvm 示例中的教程会更好。;)
Tks!
太棒了!
回答by Michal Ciechan
Googling "wpf datatempalte tutorial" give following links. i would recommend #2
谷歌搜索“wpf datatempalte 教程”提供以下链接。我会推荐#2
回答by kenjara
MSDN explains it well MSDN Data Templating Overview
MSDN 解释得很好MSDN 数据模板概述
Things to watch out for are that your itemsource is set correctly and that the properties you are binding to are public.
需要注意的是您的 itemsource 设置正确,并且您绑定的属性是公开的。

