我希望在运行时在C#WPF中更改WPF中特定tabitem的背景颜色而不使用IsSelected和IsMouseOver属性 [英] I want to change the background color of a particular tabitem in WPF without IsSelected and IsMouseOver property during runtime in C# WPF

查看:396
本文介绍了我希望在运行时在C#WPF中更改WPF中特定tabitem的背景颜色而不使用IsSelected和IsMouseOver属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我在WPF中开发一个软件,它有不同的标签,这个标签显示不同的部门。默认情况下,选项卡的背景颜色为绿色,选定选项卡的颜色为灰色。

因此,如果任何部门出现任何问题,那么特定的tabitem背景颜色应该变为红色,如果问题解决了,那么红色的tabitem背景颜色应该再次变为绿色。

是否有人为此做了一个c#示例代码,或者任何指导都非常有帮助。



提前致谢。

Hi friends,

I am developing a software in WPF which will have different tabs, and this tab show different departments. By default tab is having background color as green and for selected tab is having gray color.
So if there is any problem in any department then that particular tabitem background color should change to red and if the problem is solved then that red color tabitem background color should again change to green.
Is anybody is having a sample code of c# for doing this or any guidance will be very helpfull.

Thanks in advance.

推荐答案

这篇关于我希望在运行时在C#WPF中更改WPF中特定tabitem的背景颜色而不使用IsSelected和IsMouseOver属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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