我们如何使用dataTrigger来实现下面列出的功能 [英] how can we achieve functionality which listed bellow with out using dataTrigger

查看:99
本文介绍了我们如何使用dataTrigger来实现下面列出的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题出在这里

有1、2、3和-1的数字如何显示1表示绿色,2表示红色,3表示黄色和-1表示异常,除了数据触发还有其他方式吗?

There are number coming 1 ,2,3, and -1 how to show 1 for green and 2 red , 3 yellow and -1 exception except data trigger is there any other way?

谢谢

Bhagya

推荐答案

这很难说,可能没有看到一些代码作为您正在尝试的示例达到.

This is hard to say without maybe seeing a bit of your code as an example of exactly what you are trying to achieve.

但是听起来您可以使用绑定转换器将数字转换为形状/控件的color属性.看一看 此处

But it sounds like you could use a binding converter to convert the number to the color property of a your shape/control. Have a look here or here for examples on how to create a converter.


这篇关于我们如何使用dataTrigger来实现下面列出的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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