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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 11:22:22  来源:igfitidea点击:

WPF DataTemplate Tutorials

wpfmvvmdatatemplate

提问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

回答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 设置正确,并且您绑定的属性是公开的。