I'm using the binding RelativeSource
with the FindAncestor
Mode but the binding is not working. How do I debug and see if It is able to find the ancestor?
WPF: How do I know if Binding RelativeSource found an ancestor
Asked Answered
use Snoop
EDIT: you can of course use the usual debugging mechanisms, but I like Snoop the best. You can navigate to your control and if your binding failed it tells you so
Or you can set PresentationTraceSources.TraceLevel on the binding. If you are using VS2010 remember to set the Data binding value in Options->Debugging->Output Window
I use WPF Inspector, it's a nice free tools for debugging WPF application in XAML level.
© 2022 - 2024 — McMap. All rights reserved.