WPF上的树视图控件 [英] Tree View Control on WPF

查看:73
本文介绍了WPF上的树视图控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我再次问相同的qns,因为我不能从上一个得到太多.
我在WPF中使用TreeView,但是没有treeview_NodeMouseClick事件. WPF中也可能有事件,但不是这个事件或与此类似的事件.

//Windows应用程序

Hello,

I am asking again the same qns because i cant get too much from last one.
I am using TreeView In WPF but there is no treeview_NodeMouseClick Event. there are too may events in WPF but not this or similar to this.

// WIndows Application

private void treeview_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node != null)
            {
                GetAllchield(e.Node, e.Node.Level);

            }

        }



我想在WPF PLease中对此有所帮助.

谢谢
Neetesh Agarwal



I want similar in WPF PLease help me regarding this.

Thanks
Neetesh Agarwal

推荐答案

在WPF中实现此目标的正常方法是遵循MVVM模式,并使用许多ICommand之一将click方法绑定到节点派生的命令类(例如RelayCommand).
The normal way to achieve this in WPF is to follow the MVVM pattern, and bind a click method to the nodes using one of the many ICommand derived commanding classes (such as RelayCommand).


这篇关于WPF上的树视图控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆