在WPF中突出显示选定的行作为样式 [英] Highlight Selected Row as a Style in WPF

查看:90
本文介绍了在WPF中突出显示选定的行作为样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我很难弄清楚如何将样式应用于选定的行,以便在单击行/记录时能够突出显示其整个长度.更重要的是,我只需要在WPF中执行此操作,这样我就可以只应用一次样式.但是,在我看来,通过实验,C#在WPF上似乎占有优势-这不是我想要的.我只想在WPFY中执行此操作.有什么想法吗?

解决方案

目前尚不清楚,从您的问题中可以看出您正在谈论哪个控件.

[此处 [ 解决方案

It is not clear, from your question which control you are talking about.

This[^] article shows how to for a ListView. If you are using a different control then I found this from a search on wpf highlight selected row, just add the type of control to the end and I''m sure that you will find a solution.


use triggers to do wpf highlight selected row or use MouseEnter and MouseLeave events to change colors


See here[^].


这篇关于在WPF中突出显示选定的行作为样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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