WPF上的树视图控件

编程入门 行业动态 更新时间:2024-10-07 06:43:51
本文介绍了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上的树视图控件

本文发布于:2023-11-12 20:50:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582502.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视图   控件   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!