Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
OnpropertyChanged not working for "Selectedtimerange" property in XamOutlookCalendarView Control
posted

Hi,

I am trying to bind the property "Selectedtimerange" as follow

<ig:XamOutlookCalendarView PreferredCalendarGroupVerticalExtent="NaN"
                                       SelectedTimeRange="{Binding xamOutlookCalendarView_SelectedTimeRange}"
ViewModel:
 private DateRange xamOutlookCalendarView_selectedTimeRange;
        public DateRange xamOutlookCalendarView_SelectedTimeRange
        {
            get
            {
                if (allRequests.Rows.Count > 0)
                xamOutlookCalendarView_selectedTimeRange = new DateRange(DateTime.Parse(allRequests.Rows[0]["filterStartDate"].ToString()));
                else
                xamOutlookCalendarView_selectedTimeRange = new DateRange(factoryModel.GetServerDate(this.MainModelPage.SelectedFactory.FactoryID));
                return xamOutlookCalendarView_selectedTimeRange;
            }
            set
            {
                xamOutlookCalendarView_selectedTimeRange = value;
                OnPropertyChanged("xamOutlookCalendarView_SelectedTimeRange");
            }
        }
The correct value is loaded for the first time, but later, I can see the value changing in ViewModel but not reflecting in View.
Appreciate your help!
Thanks!