WP7 根据另一个布局元素更改 1 个布局元素
在这里尝试找到解决方案没有运气。
我已经基于此 指南。(我还在第 2 部分中使用了 ListLoopingDataSource 类,以便在循环列表中包含字符串)。
然后,我想要做的是根据循环选择器中当前选择的内容更改布局上的另一个元素(图像框/占位符)。
不知道如何做到这一点, onSelectionChanged 事件有点抽象并且没有真正的用处?我也不知道如何以编程方式更改图像,看起来我无法从代码库访问资源,只能从 xaml 访问资源。
任何帮助/建议将不胜感激。
Having no luck here trying to find a solution to this.
I've set up a looping selector based on this guide. (I also used the ListLoopingDataSource class in Part 2 in order to have strings in my looping list).
What I want to be able to do is then change another element (an image box/placeholder) on my layout, based on what is currently selected in the looping selector.
No real idea how to do this, the onSelectionChanged event is kind of abstracted and not really useful? I'm not sure how to programmatically change images either, it doesn't look like I can access a resource from the code base, only from the xaml.
Any help/suggestions would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现我可以通过使用绑定来做到这一点。
I found that I could do this by using binding.