How can i set an transparent image to an ImageAndTextButtonUIElement so only the image is displayed an not the border and the button background. I tried using the Appearance.ImageBackground and set the ThemedElementAlpha to Transparent. But now no Image is displaed at all. When using ImageAndTextButtonUIElement.Image then the image is shown but with border and button background.
Any suggestions?
Thanks and regards
Thorsten Pontow
Hello Andrew, hello Mike,
I have adapted Mike's last sample to my project. Now everything works fine for me. Thanks a lot for the support.
Regards
Thank you Mike! I will have a look at your updated sample.
If you are using a Style Library (isl), you're going to have to jump through some hoops to get the button to ignore it. Here's an updated sample.
7411.ToolbarsManagerPopupDrawFilterDemo.zip
StollfussMedienOriginal.zip
The orginal style isl-File from which we started our own isl-File. Even with this one the icon is not transparent while using a CreationFilter.
Without using the style everything is ok!
So i only need a way to prevent AppStyling for the ImageAndTextButtonUIElement. In this forum i found some posts that suggest to implement an own ImageAndTextButtonUIElement subclass and override the DrawTheme() method and return false. Is that the right way to do it?
Hello Andrew,
I used a CreationFilter with your image as a test and it still didn't work. But your example works correctly. I thought about what the difference between our implementations could be and suddenly I came up with the solution! We use a style (.isl file). When I removed the style usage everything was as I wanted it.
But since we have to use the style mandatory, my question is, what inside the style file do I have to change and how to make it work? I will add our style file as an attachment. Can you help me with that?