We have an Ultragrid using the CardView feature, now business wants to have different color for the CardView Caption and also add some icon to some of the CardView Captions.
Is it possible to do that?
So far, from my research on this site, it is a text only property and can have only two colors, one for the regular CardView Caption, and the other for the Active CardView Caption.
I found out how to do the color on caption already.
But still wondering how to do the Caption with a mixed: Text+Icon
I see ways to do the caption in image or text but not a mixed one in one caption.
Hi,
How were you able to change the color?
I don't see any way to change the color of the caption on each card. The CardCaptionAppearance is on the Override, so it applies to the entire band.
So the only way to change the colors on each individual card would be to use a DrawFilter. And I beleive the same applies to the image.
Hello,
Is it possible to post a small sample with your implementation of DrawFilter in order to be able to test and review your code, and try to find why “when I try to mix the two up, it won't work”.
I am waiting for your details.
Here is the outcome that I try to accomplish, you can see inside the CardView Caption, I need a text and next to it an icon.
Hello ,
Thank you for the provided code snippet. I have reviewed it and I notice that you are getting ImageUIElement of CardCaptionUIElement, in order to set image in the caption. By default CardCaptionUIElement has haven’t ImageUIElement. So you should add ImageUIElement to CardCaptionUIElement. You could add ImageUIElement to CardCaptionUIElement in DrawFilter implementation, but it is better approach to use CreationFilter do add UIElement. I have implemented my suggestion (my implementation is consistent with your code) in a small sample. Please run the sample and let me know if this is what you are looking for.
Please let me know if you have any further questions.
Thanks for the samples. When I put those codes inside my program, the image is blank. Am I doing something wrong? I am using Infragistics 2008 version. I am sure my imaglist is full of images.
Works now, looks like my Card_Caption_Images_DrawFilter code was messing up the image.