如何在Binding中设置列表视图中所选项目的焦点 [英] How to set the focus of selected item in listview from Binding

查看:54
本文介绍了如何在Binding中设置列表视图中所选项目的焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的主窗口中托管三个用户控件,并且我的窗口中的每个用户控件都有listview,每当我从一个用户控件中选择项目并转到第二个用户控件时,所选项目的高亮背景就会丢失。 div class =h2_lin>解决方案

列表视图中的内容很容易看不到选择。首先,您需要对每个listview控件进行HideSelection = false。将所有listview控件的背景颜色更改为黑色,将前颜色更改为红色。再次运行程序,您将能够看到选择。


I am hosting three user control in my main window and each user control in my window is having listview, whenever i am selecting item from one user control and going to second user control the higlighted background of selected item is getting lost.

解决方案

It is something with the listview that you don't see the selection easily. First of all you need to make HideSelection=false of each listview control. Change the background color to black and fore color to red of all listview control. Run the program again, and you will be able to see the selection.


这篇关于如何在Binding中设置列表视图中所选项目的焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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