开发者

Two way binding in Expression Blend 4

How does Blend 4 decide (in Silverlight 4) whether a Binding created in designer is OneWay or TwoWay? I've bound an integer from an INPC class to a DependencyProperty on my custom control, but it only generated a {Binding Something} instead of a {Bindig Something, Mode=TwoWay}.

So I've put a [Bindable(true,BindingDirection.TwoWay)], but开发者_高级运维 that did nothing, and the remarks for BindingDirection.TwoWay made no sense too, since it says things about "templates exposing properties"...


In Silverlight (unlike WPF), the Binding.Mode property defines:

One of the BindingMode values. The default is BindingMode.OneWay.

If you don't specify this, you'll get a OneWay binding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜