I'm new with Infragistics and I am trying to change the background color of the current selected month. (See image)
I want the orange to be another color.
I tried with something like this.monthview.CalendarLook.Something.Appearance.BackColor = Color.SomeColor;
Are you looking to change the selected appearance for timeframes that are actually a full month, partial month, overlapping months etc?
The MonthViewMulti does not have a SelectedMonthDayAppearance type property, for when a full month is selected but the selected days can be configured via SelectedDayAppearance property.
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();appearance2.BackColor = System.Drawing.Color.Orange;this.ultraMonthViewMulti1.CalendarLook = this.ultraCalendarLook1;this.ultraCalendarLook1.SelectedDayAppearance = appearance2;
This will override the default highlight color making the selected days appear how you have illustrated in your image.
Hi thank you for your answer! When I try what you write, it does that :
I want to change the color on the right part only (the little calendar)
It appears you are sharing an UltraCalendarLook/UltraCalendarInfo and/or shared appearances between the controls which is to be expected. You should still share a calendar info but hook it's AfterSelectedDateRangeChange event and set a new calendar look with the monthview with my code above to give it a different appearance.
Sorry I think I'am not doing it well. Here's my calendar :
I tried to put your code in the AfterSelectedDateRangeChange and it still doesn't work. I'am very new to infragistics and just came in a big project using it.
Here's my code :
The appearance for each of the schedule controls is controlled by the CalendarLook. Developers typically want the colors to be the same for ALL of the calendar controls. So what they do is they create a single CalendarLook and then set the CalendarLook property on each of their schedule controls like MonthViewMultiMulti, MonthViewSingle, or WeekView to the same CalendarLook object. That way the appearances are all the same. It looks like you have a MonthViewMulti on the right and a WeekView on the left. So if you want to affect the appearance of the MonthViewMulti (on the right) without affecting the WeekView on the left, then you have to make sure they are not both using the same CalendarLook object.
So my guess is that the code you have here which sets this.MonthView.CalendarLook = this.calendarLook is assigning the same CalendarLook that the WeekView is already using. So you are setting the appearance on both.What you want to do here is create a NEW CalendarLook and assign THAT to the MonthViewMulti. If your CalendarLook exists on the form at Design-time, then you could make a copy of it. That way, it will pick up all of the existing settings that were applied at design-time. And then you could make whatever changes you want.Another option would be to create a new CalendarLook. Then, at run-time, you could using the Save method to save the existing CalendarLook to a stream, load that stream into the new CalendarLook, and then set the selected appearance.