Hi,
I am trying to set the logicaloffset day as follows:
<ig:ScheduleSettings LogicalDayOffset="{Binding DayOffset}">
public TimeSpan DayOffset
{
get { return _dayOffset; }
set { _dayOffset =value;
RaisePropertyChanged("DayOffset"); }
}
where DayOffset is a Timespan property on my viewmodel. But this does not work, the LogicalDayOffset is a get,set property so I am not sure why this does not work.
Any help will be appreciated.
Hello Anne,
I have been looking into your issue and in order to bind the ‘LogicalDayOffset’ property you need to make the following binding :
<local:VM x:Key="vm"/>
…
LogicalDayOffset="{Binding Source={StaticResource vm},Path= DayOffset}"
Let me know, if you need any further assistance on this matter.
Hi Yanko,
Thanks for the reply, but this did not work for me, mainly because my viewmodel has parameters in the constructor so I can't simply add it to the view as per your example. Is this the only way to bind to this property. I can bind it via the code behind but the problem with that is that it does not refresh when the offset is changed.