locked
Disable DataBinding RRS feed

  • Question

  • Is there a way to disable 'automatic' DataBinding for a control?

    With automatic I mean, that the parent DataContext is automatically the DataContext for the children. In my case I have a control where I have to set the DataContext in code, after some initialisation tasks.

    This works just fine, but I want to get rid of the "DataBinding"-Errors in the Console, that appear before I can set the correct DataContext. Any ideas?

    Friday, January 20, 2012 8:49 AM

Answers

  • Hi,

    Not sure, But you can override the DataContext="{x:Null}" or to other DataContext(DataContext="{Binding ElementName=XName, Path=ElementName}"

    Friday, January 20, 2012 11:18 PM

All replies

  • Hi,

    Not sure, But you can override the DataContext="{x:Null}" or to other DataContext(DataContext="{Binding ElementName=XName, Path=ElementName}"

    Friday, January 20, 2012 11:18 PM
  • That worked! Thanks!

    Saturday, January 21, 2012 9:23 AM