2010-07-23, 02:20 PM
Setting the text to "" or string.Empty is fine if you are not repositioning anything. The visible attribute is really just if you want two different ways of displaying something depending on the data available. For instance:
This would display an image loaded in code if you have "ListObject["@hasImage] = true" or it would display the default image if you have "ListObject["@hasImage"] = false". Another usage is if you are displaying an image + text in an area and you don't have text for a specific item, you can make the image for that item larger to fill up the space where the text would normally have shown (like a video file with no metadata).
I hope that made sense, I'm not that good at explaining sometimes.
Code:
<Image visible="@hasImage" source="@previewImage" location="7,7" size="86,86" fixedAspectRatio="true" />
<Image visible="!@hasImage" source="SomeDefaultImage.jpg" location="7,7" size="86,86" fixedAspectRatio="true" />
This would display an image loaded in code if you have "ListObject["@hasImage] = true" or it would display the default image if you have "ListObject["@hasImage"] = false". Another usage is if you are displaying an image + text in an area and you don't have text for a specific item, you can make the image for that item larger to fill up the space where the text would normally have shown (like a video file with no metadata).
I hope that made sense, I'm not that good at explaining sometimes.