Tuesday, March 26, 2013

Another mysterious windows error... they are good at that.

The Error:

System.Windows.Navigation.PageResourceContentLoader.EndLoad (IAsyncResult asyncResult) at
System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback (IAsyncResult result) at
System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result) at
System.Windows.Navigation.PageResourceContentLoader <>c DisplayClass4.<BeginLoad> b_0(Object args)

What did I find that caused this? Apparently it has to do with defined styles and other resources that are used to call out brushes, templates and any styles. It seems the key phrase is "PageResourceContentLoader" in this error.

one control based off of a defined control ViewModel had a resource still calling for a UserControl

<cntrl:MyCustomizedControl 
             xmlns:cntrl=application.controlsHere
            .....>
<UserControl.Resources>
<!-- resource definitions -->
</UserControl.Resources>

One other time, the reason was that one of the controls on the page had a missing resource definition. The static resource defining a brush had been moved and it could not find it. Once I was able to get that style back, the error was gone (basically, when you get the message or the underline in code saying the resource cannot be found)

No comments:

Post a Comment