2

I have a WPF application with some binding errors, which I am trying to cleanup so that the output window is not spammed with a lot of binding information output. The strange thing I am running into is that I am not able to suppress this information from getting written to the output window in Visual Studio.

I tried adding FallbackValues, which I would expect to hide the errors from the output window, but even though I can tell the FallbackValue is being applied I still see the binding warning written to the output window.

Has anyone run into this? I thought adding proper FallbackValues to the Bindings that fail in certain scenarios would prevent the error being written to the output window.

Even stranger, I tried changing the trace level in Visual Studio's options to Off for the WPF DataBinding trace level (Tools->Options) and I still see data binding errors being written to the output window.

1 Answer 1

1

I am working on a huge WPF project that has no binding errors. I usually track them down using Snoop, for more info se ReSharper WPF error: "Cannot resolve symbol "MyVariable" due to unknown DataContext"

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for the suggestion. I also use Snoop (very handy), and I know what bindings show errors and when / why. Almost all are due to the DataContext being swapped. I am just confused as to why setting a fallbackvalue still has the error being written to the output window, as everything I have read so far suggests that as the main way to avoid unnecessary binding errors being written to output.
Interesting. I use MVVM, so the DataContext is almost never swapped. If you want fast, responsive WPF apps, its almost always better to hide/show the visual tree rather than create/destroy. I am working on a huge MVVM which never swaps the DataContext, and its fast, responsive and quite maintainable.
And, welcome to StackOverflow, hope you find it as useful as I have found it!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.