I am trying to dynamically customize UltraWinSchedule.Appointment. Appearance's border style, other than changing color, I need to make its border look thicker or different style for paticular appointment type. Is there any way to get it work?
Thanks a lot.
Instead of worrying too much about the border style... why not just change the appearance of the appointment completely? For example:
Dim appt As Appointment = New Appointment(SelectedTSRange.StartDateTime, SelectedTSRange.EndDateTime)appt.Subject = "UNAVAILABLE"appt.Appearance.BackColor = Color.OrangeRedappt.Appearance.BorderColor = Color.Redappt.Appearance.BorderColor2 = Color.Redappt.Appearance.BorderColor3DBase = Color.Redappt.Appearance.BackHatchStyle = BackHatchStyle.SolidDiamondappt.Appearance.BackGradientStyle = GradientStyle.NoneMe.CalInfo.Appointments.Add(appt)
to be a little bit more subtle than the above example... how about just changing your border to an obvious color - eg: red
CheersAaron
Hi!
Is it possible to have a code example on how to do this?
I've tried doing this:
void IUIElementCreationFilter.AfterCreateChildElements( Infragistics.Win.UIElement parent ){ if( parent is AppointmentUIElement ) { parent.BorderStyle = UIElementBorderStyle.Dashed; }}
but it gives me this error whenever it tries to set the BorderStyle:
NotSupportedException was unhandled...Specified method is not supported
Instead of a BorderStyle, I would like the border thickness to be as thick as when an appointment is selected. This way I can set a thick border and color for a particular appointment type.
The functionality you describe here is not available through the public object model. You could implement the IUIElementCreationFilter class and derive a UIElement class from AppointmentUIElement which overrides the BorderStyle property to return a different border style. You could also handle the drawing yourself using the IUIElementDrawFilter class, although this solution is less than ideal because if you make the borders thicker, the element's "client area" will not know about this and the borders could potentially hide content.