multidatatrigger

WPF Error: Cannot find governing FrameworkElement for target element

Deadly 提交于 2019-11-26 01:49:46
问题 I\'ve got a datagrid with a Row that has an image. This image is bound with a trigger to a certain state. When the state changes I want to change the image. The Template itself is set on the HeaderStyle of a DataGridTemplateColumn. This template has some bindings. The first binding Day shows what day it is and the State changes the image with a trigger. These properties are set in a ViewModel. Properties: public class HeaderItem { public string Day { get; set; } public ValidationStatus State

WPF Error: Cannot find governing FrameworkElement for target element

岁酱吖の 提交于 2019-11-26 01:25:13
I've got a datagrid with a Row that has an image. This image is bound with a trigger to a certain state. When the state changes I want to change the image. The Template itself is set on the HeaderStyle of a DataGridTemplateColumn. This template has some bindings. The first binding Day shows what day it is and the State changes the image with a trigger. These properties are set in a ViewModel. Properties: public class HeaderItem { public string Day { get; set; } public ValidationStatus State { get; set; } } this.HeaderItems = new ObservableCollection<HeaderItem>(); for (int i = 1; i < 15; i++)