1
votes

Anyone got any ideas on how to get binding errors to show up in VC++ 2013 Windows Store App. From what I found it says that you need to set up the debugger so it uses Native and Managed debugging and I did so. I even bound the event handler for BindingFailed but that doesn't fire either. Here's what I have in XAML (MainPage):

<Grid>
 <TextBlock Text="{Binding FDKJSLFJKLDSFKLJSDFKLJSDKFJKLSDFJKL}" FontSize="40"></TextBlock>
</Grid>

My Debugger Settings (Project Properties->Configuration Properties->Debugging shows "Managed and Native" as Debugger Type)

MainPage::MainPage()
{
    App::Current->DebugSettings->IsBindingTracingEnabled = true;
    App::Current->DebugSettings->BindingFailed += ref new BindingFailedEventHandler(this, &App1::MainPage::BindFailed);
    InitializeComponent();

}

And yet when I run this neither my debugfailed event handler gets invoked nor do I see any binding errors in the output window, for this expression that is trying to bind to a non-existant property.

Any ideas what I might be doing wrong ?

1

1 Answers

0
votes

Aaaand... this was a case of an (embarassing) user error. Forgot to bind to the datacontext in codebehind, so naturally the control didn't try to bind. Once I added the datacontext I started getting messages as well as my bindfailedhandler.