Hello,I'm trying to set the HighlightDayCriteria without success:
in XAML:
<ig:XamDateNavigator x:Name="dateNavigator" DataManager="{Binding Path=DataManager}" HighlightDayCriteria="DaysWithActivity" TodayButtonVisibility="Visible" DayOfWeekHeaderVisibility="Visible" DayOfWeekHeaderFormat="TwoCharacters"> <swi:Interaction.Triggers> <swi:EventTrigger EventName="SelectedDatesChanged"> <mei:CallMethodAction TargetObject="{Binding}" MethodName="OnSelectedDatesChanged" /> </swi:EventTrigger> </swi:Interaction.Triggers></ig:XamDateNavigator>
<ig:XamOutlookCalendarView DataManager="{Binding Path=DataManager}" DateNavigator="{Binding ElementName=dateNavigator}" />
in code, after settings resources, appointments, calendars and so on I
NotifyPropertyChanged(dataManagerChangeArgs);I see the binding works in the XamOutlookCalendarView, since I can see the appointments, and if I debug the date navigator I can see it has the dataManager and the dataconnector has the appointments. Nonetheless I can't see the days with appointments highlighted.
What am I missing?
Please see the attachment (consider that there are appointments either the 19th and the 21st, but none of the days is highlighted.
Roberto
Hello Roberto,
I have been looking into your issue and have created a small sample for you, named “HighlightDayCriteriaXamDateNavigator”. In the sample I set an appointment for 22.09.2012. and the CurentUserId property for the XamShedueleDataManager. Please find the attached sample and feel free to let me know if you have any further questions.
Hello Gergana,thank you for your sample, that allowed me to understand what was the problem... nonetheless I have another one now.I was missing the property CurrentUser (or CurrentUserId) of the dataManager. If I set it I can see Highlighted the days containing appointments of that Resource.
Unfortunately my agenda requires multiple owners to be shown at the same time, so I wish there was a CurrentUsers property.Is there a way to highlight the days containing appointments, regardless of one specific Resource?
I have further investigated your issue. The XamDateNavigator is designed in a way to highlights days with appointments only for one user. This user is the one that is bind to the CurrentUser property of the control. Please do not hesitate to ask if you have any questions.
Hello Gergana,I found a workaroung myself, although I would prefer another solution, and maybe you can help me. This is what I've done:
/// <summary> /// /// </summary> public class CustomDateNavigator : XamDateNavigator { /// <summary> /// /// </summary> private IEnumerable<DateTime> dates = AgendaHelper.DaysWithAppointments;
/// <summary> /// /// </summary> /// <param name="dayElement"></param> /// <returns></returns> protected override Boolean ShouldHighlightDay(CalendarDay dayElement) { return dates .Any(a => a == dayElement.StartDate.Date); } }
I wish there was a HasActivities property, but there is not.I tried to use the DataManager and the DataConnector objects but they are null.
I am just checking if you require any further assistance. Please do not hesitate to ask if you have any questions.
I have further researched you issue. After the research this functionality has been determine as a new Product Idea. I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI12090195.
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com