I've a read only property I need to display in a textbox, and getting this error at runtime. I've set IsEnabled="False"
, IsReadOnly="True"
– no luck.
Other searches say the readonly should fix it, but not for me.
I've got an ugly workaround by adding a dummy setter…
Wpf – A TwoWay or OneWayToSource binding cannot work on the read-only property
bindingwpf
Best Answer
It's hard to guess without code, but you should be able to set the BindingMode to OneWay.
or from code: