5
好的,如果DataTriggers在Silverlight和Windows 8中不再工作,谁能告诉我如何替换这个功能?Windows 8 XAML不支持触发器?
例如;
在ListView或GridView控件,如果一个项目有一个值x,
if x == "True"
StackPanel style= "MakeBackgroundGreen"
else
StackPanel style="MakeBackgroundRed"
有没有办法使用XAML和C#(首选C#,但任何语言来创建Windows 8中Metro风格应用程序是这样的会做)。
我听说有人提到使用VSM(Visual State Manager),我该怎么做?
非常感谢。
看看也点击:http://计算器.com/questions/7439532/datatrigger-in-winrt – 2012-04-08 07:00:04
对不起? XAML中没有什么改变了WIndows 8.你在谈论WinRT吗?在Windows 8中运行时,DataTriggers对我的wpf应用程序完全正常工作。 – TomTom 2012-05-21 07:11:17