从ListView中打开所选项目的扩展器 [英] Open an Expander of a selected item from a ListView
本文介绍了从ListView中打开所选项目的扩展器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要通过代码选择ListView的项.这些项目被分组并包装在扩展器中.因此,如果选择了一个包含的项目,也应该打开一个扩展器.
现在,我很难通过代码或触发器来做到这一点.如何做到这一点?
这是ListView的代码:
I need to select an item of a ListView by code. The items are grouped and wrapped in Expanders. Therefore an Expander should be opened as well if a contained item is selected.
Now, I have difficulties to do that either by code or by triggers. How can be done that?
This is the code of the ListView:
< UserControl.Resources > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< local:NAV x: = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< CollectionViewSource x: = =
推荐答案
解决方案.这很丑陋,有点慢.无法访问选定项目中的组吗? I have found a solution. It is quite ugly and a bit slow. Is there no other possibilities to access groups from a selected item?
这篇关于从ListView中打开所选项目的扩展器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆
|