I'm trying to being able to show or a hide an icon on a button when a PDF has been loaded. How do I show/hide an imported image resource for the project. Attached is a screenshot of the button when I set the image at design time but I need a way to show/hide this in code. Thanks!
4 Answers, 1 is accepted
The RadButton.DisplayStyle property gives you the opportunity to control whether the image will be shown or not. If you need to show text and image, you set the DisplayStyle property to ImageAndText. Otherwise, set it to Text:
I hope this information helps.
Hi, I had to modify the code to this:
My issue is that this shows the image only if I set it at design time. If I use:
In the code when I want to show the text and image after a user attached a PDF it does nothing and the button just has text.
I have tested this and it works on my side. For convenience, I prepared a small sample, based on the information that you provided so far and attached it to this thread. Could you please check it and let me know how it differs from your real setup?
I am looking forward to your reply.
Yes I was able to use your sample to make it work. Thanks!