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
Sorry. I forgot about the Command.CommandTarget attached property so you could use that to provide the target if the object on which you're using the command source is outside the target control.
That is another alternative but then I believe you have to do one of the following:
Why not use the commands for this type of action.
I had the same problem and start using the command because they do change the SelectedDates.
xmlns:igCommands="clr-namespace:Infragistics.Controls.Schedules.Primitives;assembly=InfragisticsWPF4.Controls.Schedules.v11.1" xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"
<Button Name="btnDayView" Content="Dag"> <ig:Commanding.Command> <igPrim:XamOutlookCalendarViewCommandSource CommandType="SwitchToDayView" TargetName="OutlookCalender1" EventName="Click" ></igPrim:XamOutlookCalendarViewCommandSource> </ig:Commanding.Command> </Button>
Right it is not bindable just like the SelectedDates of the WPF Calendar or the SelectedItems of a a Selector (e.g. ListBox). You could probably write your own attached behaviour that hooks the CollectionChanged of the SelectedDates and of your collection and keeps the two in sync.
I am sorry, there is a SelectedDates property, but it is not bindable.