ListView DisplayMemberPath Template Bug?

前端 未结 1 530
轮回少年
轮回少年 2021-01-28 13:26

I am wondering if anyone know something about this issue. It seems like the default template provided here for ListViewItem does not support DisplayMemberPath of Li

1条回答
  •  猫巷女王i
    2021-01-28 14:00

    I asked a similar question here

    The DisplayMemberPath property is actually a shortcut that will tell WPF to create the default item template with nothing more than a TextBlock with it's Text bound to whatever field is in DisplayMemberPath

    If you overwrite the item template in addition to setting DisplayMemberPath, then you are essentially overwriting the template that DisplayMemberPath created for you, so that property becomes useless.

    0 讨论(0)
提交回复
热议问题