【发布时间】:2011-09-13 12:14:22
【问题描述】:
我有具有 3 个属性的对象:
CouldBeWhite bool
CouldBeGreen bool
CouldBeRed bool
If CouldBeWhite is true, then foreground of row should be white, if
CouldBeGreen is true, and CouldBeWhite is false, then row should be
Green If CouldBeRed is true, and and CouldBeWhite is false and
CouldBeGreen is false then row should be Red In other case row
should be blue.
我现在的想法是在 viewmodel Color 中添加一些新属性,当我计算行的颜色时。
或者也许有更好的方法来实现这个?
【问题讨论】:
-
这种逻辑在我脑海中烧出一个洞。
enum ShouldBe { White, Green, Red }怎么样,然后完成。
标签: silverlight gridview silverlight-4.0 mvvm