Could somebody please tell me about way to solve problem?
I have simple binding where I want to bind label text to "DateTime" property of one of my classes. The problem is, what this binding correctly works only once when control is loaded, but it doesn't react later, when I change source property value.
I checked, and I am sure what I am changing source property value. I also tried to use different "UpdateSourceTrigger" values, but there were no difference.
What I did wrong here? Could someone please give some ideas? Thank you in advance.
public CheckListTaskControl(ICheckListTask task)
{
InitializeComponent();
_task = task;
dateFromLabel.SetBinding(Label.ContentProperty,
new Binding()
{
Source = _task.TaskDatePeriod,
Mode = BindingMode.OneWay,
Path = new PropertyPath("DateFrom"),
Converter = new DateTimeFormatConverter(),
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
ConverterParameter = _dateFormat
});
}}
_dateFormat is just string "yyyy-MM-dd HH:mm"