WPF: TreeViewItem bound to an ICommand

后端 未结 6 649
离开以前
离开以前 2021-02-08 19:24

I am busy creating my first MVVM application in WPF.

Basically the problem I am having is that I have a TreeView (System.Windows.Controls.TreeView) which I have placed

6条回答
  •  庸人自扰
    2021-02-08 19:30

    This is a good example of how the MVVM is very much an after-thought in WPF. You expect there to be Command support of certain gui items, but there isn't, so you're forced to go through an elaborate process (as shown in Will's example) just to get a command attached to something.

    Let's hope they address this in WPF 2.0 :-)

提交回复
热议问题