We have a monthviewmulti that we are using to indicate availability. If a given day is available we add an appointment to the day, through an apperance this makes that day bold to show the user.
When the form is opened a calendar look and calendar info are assigned in code on the constructor of the form.
The form also has a drop down that changes an option which will alter the information the MonthViewMulti shows, so I run exactly the same code that is on the constructor to clear down everything - this works to clear down, but has the side effect of resizing the month area, this results in only the first digit of each month being displayed.
What controls the size of each month area within the control ? If I can manually set this it will solve my problem.
If I followed this correctly, the act of assigning a new UltraCalendarInfo/UltraCalendarLook is causing the control to not paint properly. This is probably a bug in the control, but you might be able to work around it with the following code:
this.ultraMonthViewMulti.UIElement.DirtyChildElements( false )this.ultraMonthViewMulti.UIElement.Refresh();
In a nutshell yes it turned out to be a redrawing problem. I actually ended up solving it by un assigning the calendar look, maually re-creating it with the settings I wanted and then re-assigning it, I will try your way though as its much neater!
I've put my refresh code below in case it helps your devs find the bug.
Thanks.
Refresh code:
MonthViewMulti1.CalendarInfo =
null;
ultraCalendarInfo1 =
new UltraCalendarInfo();
ultraCalendarInfo1.MaxSelectedDays = 1;
ultraCalendarInfo1.FirstDayOfWeek =
FirstDayOfWeek.Monday;
ultraCalendarInfo1.SelectTypeDay =
SelectType.Single;
uxDateSelect.CalendarInfo = ultraCalendarInfo1;