WP7/Silverlight Hyperlink Image

后端 未结 3 1193
别那么骄傲
别那么骄傲 2021-01-14 01:59

I am new to both Silverlight and WP7. I have been attempting to hotlink an image by using a HyperlinkButton and setting its content to an Image. However, this just makes my

3条回答
  •  野的像风
    2021-01-14 02:30

    This is a bit of an oddity in that you can't directly place an Image as the control's content. The topic was explored here during beta.

    Peter Torr's had previously suggested using a stackpanel as the hyperlink's content. This did work at the time, but does not appear to be working at the moment for some reason.

    With that said, Richard Woo identified a work around which was to use the hyperlinks background property. I confirmed this still works as follows:

        
            
                
            
        
    

    It may be worth raising this as an issue to be looked into on the suggestions forum or connect.

    As far as alternatives to hyperlink go, Matt's option with an Image and gesture looks workable. You could also use a Button and retemplate it's appearance in Blend.

提交回复
热议问题