Hello,is it possible to format the xamDateNavigator (apart from Highliting the day), like changing the foreground in red (saturdays and sundays, christmas ...)?
Best Regards
Roberto
Hello,
I have been looking into your question and I can suggest you look into the following link from our online documentation that shows the available brushes that you can modify :
http://help.infragistics.com/Help/Doc/WPF/2012.2/CLR4.0/html/InfragisticsWPF4.Controls.Editors.XamCalendar.v12.2~Infragistics.Controls.Editors.CalendarResourceId.html
and in the following forum thread where it is shown how to use them :
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/64693/styling-xamdatenavigator
If you would like to highlight only Sunday and Saturday you can use the following code :
<ig:XamScheduleDataManager x:Name="dataManager"
DataConnector="{Binding ElementName=dataConnector}">
<ig:XamScheduleDataManager.Settings>
<ig:ScheduleSettings WorkDays="Sunday, Saturday"/>
</ig:XamScheduleDataManager.Settings>
</ig:XamScheduleDataManager>
Hello Nikolov,thank you for your answer.I guess that I explained myself badly, so I'll try to be more explicit giving you a more precise picture.
I am developing an application dedicated to school management, and I'm using your XamDateNavigator. Apart from highlighting the days with activities (function already accomplised) I would like to show all the vacation days in red (the xamdatenavigator should show the Sundays and other dates in red, while the black standard foreground color is for normal school days, and the highlighted black color is for schooldays with some particular activity in it.
The christmas school vacations in Italy are quite long (from december 20th to january 7th). I would like all those days to appear with a red foreground).
Is there a way to accomplish such a functionality?Roberto
It's me again. Let me show you the code I used with your Windows Forms Scheduling components to get the risult I'm looking for:
private List<TableVacation> vacations = new List<TableVacation>();
//repeating vacations (same date each year) vacations.Add(new TableVacation("Capodanno", 1, 1)); vacations.Add(new TableVacation("Epifania", 1, 6)); vacations.Add(new TableVacation("Festa della liberazione", 4, 25)); vacations.Add(new TableVacation("Festa del lavoro", 5, 1)); vacations.Add(new TableVacation("Festa della Repubblica", 6, 2)); vacations.Add(new TableVacation("Ferragosto", 8, 15)); vacations.Add(new TableVacation("Ognissanti", 11, 1)); vacations.Add(new TableVacation("Natale", 12, 25)); vacations.Add(new TableVacation("Santo Stefano", 12, 26)); vacations.AddRange(TableVacation.GetList()); //different date each year (easter) DateTime pasquetta = DateTime.Today.Easter().AddDays(1); DateTime pasquettaAnnoScorso = DateTime.Today.AddYears(-1).Easter().AddDays(1); DateTime pasquettaAnnoProssimo = DateTime.Today.AddYears(1).Easter().AddDays(1); vacations.Add(new TableVacation("Pasquetta", pasquetta)); vacations.Add(new TableVacation("Pasquetta", pasquettaAnnoScorso)); vacations.Add(new TableVacation("Pasquetta", pasquettaAnnoProssimo)); private Boolean IsVacation(DateTime first) { return vacations.FirstOrDefault(v => (v.Month == first.Month && v.Day == first.Day) || (v.Start <= first.Ticks && v.End >= first.Ticks)) != null; } DateTime start = new DateTime(ultraMonthViewMulti.VisibleMonths[0].Month.Year.YearNumber, ultraMonthViewMulti.VisibleMonths[0].Month.MonthNumber, 1); DateTime end = new DateTime(ultraMonthViewMulti.VisibleMonths[ultraMonthViewMulti.VisibleMonths.Count - 1].Month.Year.YearNumber, ultraMonthViewMulti.VisibleMonths[ultraMonthViewMulti.VisibleMonths.Count - 1].Month.MonthNumber, DateTime.DaysInMonth(ultraMonthViewMulti.VisibleMonths[ultraMonthViewMulti.VisibleMonths.Count - 1].Month.Year.YearNumber, ultraMonthViewMulti.VisibleMonths[ultraMonthViewMulti.VisibleMonths.Count - 1].Month.MonthNumber)); end = end.AddDays(7);
Boolean saturday = FormMain.agus.SaturdayIsWorkingDay; for (DateTime first = start; first < end; first = first.AddDays(1)) { if (first.DayOfWeek == System.DayOfWeek.Sunday || (saturday == false && first.DayOfWeek == System.DayOfWeek.Saturday) || IsVacation(first)) { DayLook dl = ultraMonthViewMulti.CalendarLook.GetDayLook(first, true); dl.Appearance.ForeColor = Color.Red; } }
I hope it is more clear now. Your ultraMonthViewMulti has a DayLook object. Is there a similar object for your XamDateNavigator?
Hello Roberto,
After some research the functionality that you are looking for has been determined to be 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 PI12110085.
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
Thank you for your request.
I am just checking if you require any further assistance on the matter.