Style triggers in Windows Phone 7

后端 未结 2 495
旧巷少年郎
旧巷少年郎 2021-01-23 04:24

I want to use the style triggers in Windows Phone 7 to change the source of an image depending a boolean variable.

I Wann do something like this :



        
相关标签:
2条回答
  • 2021-01-23 04:57

    Why not just databind the imagesource and update that based on (or rather than) IsSelected?

    0 讨论(0)
  • 2021-01-23 04:58

    Silverlight 3 (on which the WP7 framework is based) doesn't support style triggers. You could apply a trigger to the Image element itself instead of the style, but you'd need to get hold of an implementation of DataTrigger from somewhere. You can probably pull it out of the Blend SDK.

    0 讨论(0)
提交回复
热议问题