WPF中的TreeView与Button在MVVM中单击

WPF中的TreeView与Button在MVVM中单击

本文介绍了WPF中的TreeView与Button在MVVM中单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WPF的初学者..

我对WPF有要求。请仔细阅读附图。



[]



1.我有3个按钮,即Root,Child,GrandChild。当我单击Root时,应该创建Root节点。单击Child时,应在root下创建子节点。当我单击GrandChild时,GrandChild节点应该在Child下创建,依此类推。

2.创建的节点应该是可编辑的。

3.当每个节点同时创建另外1个文本框应该在文本框面板中创建(与节点绑定),我可以从树视图和文本框编辑节点名称,即从两个方向编辑。



**我是WPF的初学者。我正在努力,但我无法做到这一点。所以需要你的帮助。这应该在MVVM中完成。

**我已经开始使用basic了。但这是我的要求,不能避免这种情况。所以寻求帮助...

I am Beginner in WPF..
I have an requirement in WPF. Please go through the attached image.

http://stackoverflow.com/questions/26709963/treeview-in-wpf-with-button-click-in-mvvm[^]

1. I have 3 buttons, i.e Root, Child, GrandChild. When I click on Root, Root node should get created. When I click Child, Child node should get created under root. When I click GrandChild, GrandChild node should get created under Child, and so on.
2. The nodes which get created should be editable.
3. And when Each node get created same time 1 more textbox should get created in textbox panel (Which is binded with the node), and I can edit the Node name from tree view and also from the text box i.e from both the way.

** I am Beginner in WPF. I am trying my best but I am not able to do this. So need your help. This should be done in MVVM.
** I already started with basic. But this is a requirement I got, and cant avoid this. so seeking help...

推荐答案


这篇关于WPF中的TreeView与Button在MVVM中单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 21:23