An image says more ;-). I would like to have a custom image and make it larger. (for the Column Chooser Icon).
Is this possible?
Maybe with a creationfilter? Or setting a property?
Can you provide me with an example?
Kind regards, Lieven Cardoen
Hello,
You can change the image itself by setting the ultraGrid1.DisplayLayout.Override.RowSelectorHeaderAppearance.Image property.
I think it should be possible to change the size using a creation filter. I am working on this. If it is possible, I will provide you with the code I used.
Please let me know if you have any questions.
Hi Mike,
Tried this and the image doesn't increase... The code is triggered. The parent rect has the correct values. But the imageElement doesn't seem to do anything with its new Rect.
Lieven
Don't i also need a drawfilter? Could you try it out in a little example (solution)?
Thx, Lieven
As you can see, the Image size just remains the same.
Is there also a way to enlarge the right arrow in the Row? (I can create a different thread for that one if you want, but maybe it can be done with the same CreationFilter....).
Any update on this?
Can I use the same CreationFilter to add space before the Column Header Text?
Hi Lieven,
The reason that the image does not appear larger is because the default image we provide is already at full size. There are two ways you can resolve this:
1) Provide a larger image. The larger image will use up more of the space. You can set the image like this:
ultraGrid1.DisplayLayout.Override.RowSelectorHeaderAppearance.Image = new Bitmap(@"../../Image.jpg");
2) Enable scaling on the UI element. You can turn scaling on by adding a line to the creation filter in AfterCreateChildElements after we get the ImageAndTextDependentImageUIElement:
(imageElement as ImageAndTextDependentImageUIElement).Scaled = true;
I do not recommend this approach if you plan to use the provided image, as the default image is small and may not look good scaled up.
I've attached a sample that demonstrates these approaches. One approach or the other should be sufficient, but both won't hurt anything.
Thx, will try this immediately. And is there a way, related to my other question, to use the same CreationFilter to have space before the Column Header Text?
See https://es.infragistics.com/community/forums/p/111191/521654.aspx#521654
Thx, Lieven Cardoen