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 Lieven,
You can increase the size of the column chooser button by setting the following properties:
ultraGrid1.DisplayLayout.Override.RowSelectorWidth = 100;ultraGrid1.DisplayLayout.Bands[0].ColHeaderLines = 5;
You can use this creation filter to increase the size of the image once the button is larger:
public class ColumnChooserButtonCreationFilter : IUIElementCreationFilter{ public void AfterCreateChildElements(UIElement parent) { if (parent is ImageAndTextUIElement && parent.Parent is ColumnChooserButtonUIElement) { UIElement imageElement = parent.GetDescendant(typeof(ImageAndTextDependentImageUIElement)); imageElement.Rect = parent.Rect; } } public bool BeforeCreateChildElements(UIElement parent) { return false; }}
public bool BeforeCreateChildElements(UIElement parent) { return false; }}
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....).
Hi Mike, is there also a way to enlarge the arrow in the Row Header? (the small arrow)
Found it. Thx.