Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Error 40 BindingExpression path error: property not found on 'object'
    primarykey
    data
    text
    <p>I'm banging my head on my desk with this binding error.. I have checked several of the postings for the <code>BindingExpression</code> path error and cannot see anything that works with my situation.</p> <p>Anyway, I have a custom control called <code>IncrementingTextBox</code>. I am trying to disable it whenever the user 'checks' the <code>CheckBox</code> above it.</p> <p>I have a binding on the <code>CheckBox</code> <code>IsChecked</code> property that is working fine and is firing when it is supposed to. It is correctly setting the <code>UseSensorLength</code> property on the ConfigurationModel.</p> <p>However, the binding on the <code>IncrementingTextBox</code> <code>IsEnabled</code> property is causing a <code>BindingExpression</code> path error and so doesn't update at all.</p> <p>As a test, I tried in the code behind to enable and disable the control and it works just fine, but I can't seem to get the Binding to work on it.</p> <p>Here is a snippet from my xaml:</p> <pre><code>... DataContext="{Binding RelativeSource={RelativeSource Self}}" ... ... &lt;CheckBox Content="Use Sensor Length" Margin="30,6,0,0" IsChecked="{Binding ConfigurationModel.UseSensorLength, Mode=TwoWay}"/&gt; &lt;local:IncrementingTextBox x:Name="video_length_textbox" Margin="0,0,0,5" IsTextEnabled="False" IsEnabled="{Binding ConfigurationModel.DontUseSensorLength}" ValueChanged="VideoEventValueChanged"/&gt; </code></pre> <p>And Here is a snippet from my ConfigurationModel:</p> <pre><code>public bool DontUseSensorLength { get { return !UseSensorLength; } } public bool UseSensorLength { get { return _useSensorLength; } set { _useSensorLength = value; OnPropertyChanged("UseSensorLength"); OnPropertyChanged("DontUseSensorLength"); } } </code></pre> <p>Here is the error message I am getting in my output window when running the app:</p> <blockquote> <p>System.Windows.Data Error: 40 : BindingExpression path error: 'ConfigurationModel' property not found on 'object' ''IncrementingTextBox' (Name='video_length_textbox')'. BindingExpression:Path=ConfigurationModel.DontUseSensorLength; DataItem='IncrementingTextBox' (Name='video_length_textbox'); target element is 'IncrementingTextBox' (Name='video_length_textbox'); target property is 'IsEnabled' (type 'Boolean')</p> </blockquote> <p>Remember, the 'UseSensorLength' property binding is working fine, but the 'DontUseSensorLength' binding is causing the above 'BindingExpression path error'.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload