Vault of Thoughts

2006-06-27

Please visit my new blog at vaultofthoughts.net

UrlProperty and skins

While working with my validator controls that support displaying images, I have come to a situation where I needed the image to be themable. Easy you think?


Not so easy as it should be. I have added the Themeable(true) attribute to an ImageUrl property, put a control on a page set everything in the skin file, compilled and... ??? No it didn't work. Url points to the same directory as specified in the skin file but is not prefixed with the theme folder name. A quick reflector peek at the Image control and the solution was found. There is a little known UrlProperty attribute that has to be applied to a property which we want to behave as expected when applying urls from skin files.

If you liked this article why not support its author by making a donation?

0 Comments:

Post a Comment

<< Home