I am looking to only show the border for an appointment on the left hand side, I found a way to change the border color using appointment.Appearance.BorderColor = Color.FromArgb(214, 240, 254). This allowed me to essentially hide the border by making it the same color as the appointment, but I still want a black line on the left hand side or a left border. Any ideas?
Hello Matthew,
You can remove specific borders of an appointment using a DrawFilter. In the DrawElement method you have to get the EditorWithTextUIElement of the appointment and draw its left border only.
Attached is a sample project that demonstrates this approach. I get the EditorWithTextUIElement rectangle coordinates and draw a red border on its left side using the Graphics object.
Couple problems, I have no editorwithtextUIelement, the only child elements of the appointmentuielement is two image elements and a textUIelement. I tried your code with the TextUIElement and I was able to draw a line but it kept the original borders instead of removing them, and the line did not show up on the left or bottom because the borders that were there stayed on top. Any ideas?
My guess is that you should check for a TextUIElement in the GetPhasesToFilter method, so that this element would not draw its borders.
If you have not already done so, I recommend that you get the Infragistics UIElementViewer Utility since it is a huge help when working with UIElements.