How to data bind multiple values to a single TextBlock.Text in WP7?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 15:52:29

Silverlight 3 (on which the Windows Phone 7 framework is built) doesn't support MultiBinding, which is what you would use to achieve what you need. However, there is a workaround solution that you can use described in the post MultiBinding for Sivlerlight 3, which should also work on WP7.

Alternatively, you could extend your view model (or at least the properties that you are exposing) to expose a property that aggregates your values and raises property change notification when either changes.

If you are working with WP7.1 (I know you mentioned WP7), take a look at the Cimbalino Windows Phone Toolkit. It offers a MultiBindingBehavior.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!