So far, we worked with styles by setting a static value for a specific property. However, using triggers, you can change the value of a given property, once a certain condition changes. Triggers come in multiple flavors: Property triggers, event trig
官方文档中对DataTrigger的介绍 Represents a trigger that applies property values or performs actions when the bound data meets a specified condition. 某词典的翻译: 当绑定的数据满足指定的条件时,应用(指定的)属性或执行操作的触发器 下面我演示一遍官方文档中的示例,根据官网的描述,建立实体类,然后编写前台代码 先来张效果图 通过DataTrigger,将省份为江苏省的