在我的一个应用程序中,我有这样的一段代码:
通常我会认为这是某种骗局,但我知道这个人对编码一无所知,“Mode=OneWay”显式设置有帮助。默认绑定模式如何在不同的机器上不同呢?
<ProgressBar Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Height="27" Margin="5,0,5,0" Maximum="{Binding TabuProgressEnd}" Value="{Binding TabuProgress}" />
在我测试时一切正常,但当我的客户在VS中打开并运行此代码时,抛出了一个异常:
An unhandled exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
Additional information: A TwoWay or OneWayToSource binding cannot work on the read-only property 'TabuProgress' of type 'TSPLib.TabuEngine'.
通常我会认为这是某种骗局,但我知道这个人对编码一无所知,“Mode=OneWay”显式设置有帮助。默认绑定模式如何在不同的机器上不同呢?