1
Vote

NumericUpDown IsEnabled Binding does not work on DataForm if Mode=OneWay

description

If Mode is set to TwoWay, the NumericUpDown is enabled/disabled as the check box is checked/unchecked. A text box with Mode=OneWay works as expected.
 
<dataForm:DataField Label="Override">
<StackPanel Orientation="Horizontal">
    <CheckBox x:Name="_enableCheckBox"/>
    <TextBox IsEnabled="{Binding IsChecked, ElementName=_enableCheckBox, Mode=OneWay}" Width="75" />
    <toolkitInput:NumericUpDown IsEnabled="{Binding IsChecked, ElementName=_enableCheckBox, Mode=OneWay}" Width="75" />
</StackPanel>
</dataForm:DataField>

comments

icnocop wrote Sep 7, 2012 at 3:21 AM

I was having the same issue.

As a work-around, I had to specify IsEnabled="{Binding Model.MyBooleanValue, Mode=OneWay}" on the dataform:DataField element itself instead of on the CheckBox in the datafield's content.