When i switch the CurrentView between Week and Day View, the control still displays in the WeekMode, even though the CurrentViewMode of the XamOutlookCalendarView is set to OutlookCalendarViewMode.Day. Same behavior is observed when switching between ScheduleView to DayView.
However, if I switch from month view to day view, it works fine.
Please Suggest.
Thank You,
Hariharan
I dont see a "SelectedDates" collection property exposed by the date navigator. There is a Selected Date, but thats just a single date.
My mistake - I thought we exposed the VisibleDates but that is just maintained by each schedule control within the xamOutlookCalendarView. If you're using the xamOutlookCalendarView with a xamDateNavigator then you can listen for the SelectedDatesChanged of the xamDateNavigator and use the SelectedDates collection to get the dates since they will be synchronized.
Ok so I cannot do a binding for CurrentViewDateRange property. Is there a way for me to handle the VisibleDatesChagned event? Cause I dont see one now. I need to do something when the user changes the visible dates, either by selecting a new date from the date navigator, or by changing the view type or by simply scrolling in teh month view. I need to know when the Current Visible Dates are changed.
As an alternate, I thought I could use the DateNavigatorSelectedDates, but that does not have a SelectedDates proeprty, and i cannot use the values from the event args(addeditems and removed items)
The VisibleDates is a collection of the Dates displayed by the control. It is updated as the view changes and the collection can be manipulated to affect the current view control. It is not a bindable property because the control needs to manipulate it based on the navigation. You were asking about changing the view to a single day in which case when you change the view to DayViewDay you could also remove all the dates from the VisibleDates collection except 1. You could do this in your own attached behavior if you wanted.
CurrentViewDateRange is just a range comprising the earliest and latest dates in the visible dates and is for informational purposes. The visible dates can contain discontiguous days/weeks just as you can do in Outlook.
How do I set the visible dates? There is a CurrentViewDateRangeProperty that cannot be set , and I cant even bind to it with a oneway to source binding. Also the dateNavigator does not expose SelectedDates property . Is there a way for me to get the visible dates in xaml using bindings?