[RESOLVED]Desing time error when loading a form

Hi. This might not be the place because the question involves a little WPF, but I’ll give it a shot:

I use a converter w/ spring to localize my text from a resource file. I have a class that uses this piece of code:


If I try to bind the Text property of any control to that Converter, it works fine at runtime (as all assemblies have been loaded), but the Page doesn’t show up at desing time, and I get this error:

No context registered. Use the ‘RegisterContext’ method or the ‘spring/context’ section from your configuration file.

An example of the markup would be this (here’s the WPF part):

<TextBlock Text="{Binding ., Converter={StaticResource LocalizacionConverter}, ConverterParameter=Titulo_Vista_Ejemplos}" />

What I think is happening is that Visual Studio is trying to execute my code at design time, and because of all the spring and stuff, it produces the error.

The specific question is: Is there a way, like a preprocessor directive or an attribute for my class, to tell Visual Studio not to run my code at design time?

Thanks a lot.


You can get help about WPF at:

Yeah, I figured. But since I only got the error at design time, I thought it might be a Visual Studio issue. Thanks anyway.

Leave a Reply