WPF DataTemplate Tutorials

2019-02-25 16:49发布

问题:

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??

I'm using MVVM Pattern, so if you know a tutorial in mvvm examples it will be better. ;)

Tks!

回答1:

Googling "wpf datatempalte tutorial" give following links. i would recommend #2

  1. Data Templating Overview - MSDN - Microsoft
  2. WPF Tutorial | Data Templates
  3. A Guided Tour of WPF – Part 4 (Data templates and triggers...


回答2:

MSDN explains it well MSDN Data Templating Overview

Things to watch out for are that your itemsource is set correctly and that the properties you are binding to are public.