【发布时间】:2016-07-15 20:20:04
【问题描述】:
我有一个 TimeSpan 类型的 DependencyProperty 控件。当我尝试绑定到该属性时,该值没有被更新。
控件的使用:
<controls:TimeControl Time={Binding SomeTimeSpanProperty} />
当我更改控件中的时间值时,更改不会在 SomeTimeSpanProperty 中更新。但是,如果我将 {Binding SomeTimeSpanProperty} 更改为 {Binding SomeTimeSpanProperty,Mode=OneWayToSource},它就会更新。
【问题讨论】:
-
为什么会有这么多的downwotes?这个问题到底有什么问题?
标签: c# wpf mvvm binding two-way