locked
Blend designer does not understand config file. RRS feed

  • Question

  • My Blend 4 application uses an ObjectDataSource which gets its data from an external class library originally designed in Visual Studio. The class library reads the connection string from the configuration file. Configuration files are usually placed in the application folder, which is how Visual Studio works. This is fine, up to now.

    But it doesn't seem to me that Blend 4 understands configuration files. When I load my XAML into the designer, my element that represents the class library, which is a resource, ends up having red squiggly lines underneath, telling me that the object reference is not set to an instance. But when I place the config file in the bin folder and run the app, it works.

    Here's my question: Is this the way Blend should be used? I understand that Blend is a designer's tool, so is it safe to assume that I shouldn't even have the class library as a resource in my XAML file. After all, most designers shouldn't be told to add a class library in their XAML. This is the developer's job. Maybe there's a reason why the Blend designer does not understand config files, because designers shouldn't have to worry about config files.

    Can someone shine some light into this? I'm actually playing both roles in this WPF project, developer and designer.

     

    Saturday, September 4, 2010 4:25 PM