Hello,
it seems that Wisej shrinks images in buttons to 18px width/height; how can I change this? I tried with CssStyle/CssClass, but no luck.
Honestly, I’m coming from WinForms; still learning the CSS stuff.
EDIT: To specitfy the question: How can it be changed globally, and how for a single control?
Thanks for a pointer!
Excellent – defined in the themes file! Thanks so much!
Using an ImageList for single buttons is a neat trick 😉
It can be changed globally via the theme:
Locate the button appearance in your theme and modify the iconSize property within its properties section for the default state:
Code
"button": {
"states": {
"default": {
"properties": {
"iconSize": {
"width": 64,
"height": 64
}
}
}
}
}
It can be changed locally (for a single button) using an ImageList
1. Add an ImageList
component to your form or component.
2. Set the desired ImageSize
property on the ImageList
component (e.g., new Size(32, 32)
).
3.Assign this ImageList
component to the ImageList
property of the Button
control. The button will then automatically resize any image assigned to its Image
property to match the ImageSize
defined in the ImageList
, even if the image is not explicitly added to the ImageList
itself.
See attached sample.