Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
417
Override Mutiple Drawphases for Same Object
posted

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;

}