I’m currently implementing a Drawfilter on a grid to add colour to the background cells based on the value of the cell. I’d like to also draw my own borders for these cells so I've removed the default border painting via the override …
.Override.BorderStyleCell = UIElementBorderStyle.None
It appears that I will have to override the DrawPhase.AfterDrawBackColor but I’m already implementing DrawPhase.BeforeDrawBackColor for this type of object and can't figure out how to ensure that both of these are overridden with my own draw action? Please also note that I'm well aware of the fact that not all borders are currently drawn by the default paint operation and the reasons for doing so.
Kind Regards,
Tim
public Infragistics.Win.DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams)
{
if ((drawParams.Element is EmbeddableUIElementBase) && (drawParams.Element.GetContext(typeof(UltraGridCell)) != null))
{ // set the phase to override a sepecific draw event
return DrawPhase.BeforeDrawBackColor;
}
// do nothing
return DrawPhase.None;
The DrawPhase enumeration is decorated with the Flags attribute, so you can combine values using the bitwise OR operator:
return DrawPhase.BeforeDrawBackColor | DrawPhase.BeforeDrawBorders;
Thanks !