在listview中恢复列? [英] Recover Column in listview?

查看:64
本文介绍了在listview中恢复列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在两个难度中有两个控件Windows(formularys)

在第一个窗口中我有一个ListView。在第二个窗口中,我有一个ListBox。

我想知道可以只恢复一列ListView(window1)并用列的内容填充ListBox(window2)。 />
谢谢你



注意:我正在使用WPF,而不是Windows窗体。

Hi,
I have two controls in two différents Windows (formularys)
In the first Window i have a ListView. In the second window i have a ListBox.
I want to know it is possible to recover just one column of ListView (window1) and fill the ListBox (window2) with the content of the column.
Thanks you

Note: i'm working with WPF, Not with Windows forms.

推荐答案

绝对有可能。我最初的想法是创建一个与ListView控件关联的行为,并将ListBox控件传递给它。然后,该行为将订阅ListView的相应事件,并还设置ListBox控件的ItemsSource的DataContext。对ListView中所选单元格的任何更改都会更新ItemsSource的属性,并触发NotifyPropertyChanged。
It is definately possible. My initial idea would be to create a behaviour associated with the ListView control, and pass the ListBox control to it. The behaviour would then subscribe to appropriate events of the ListView, and also set the DataContext of the ItemsSource of the ListBox control. Any changes to the selected cell in the ListView would update the property of the ItemsSource, firing the NotifyPropertyChanged.


这篇关于在listview中恢复列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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