locked
How do I restore the ability to add design-time resources? RRS feed

  • Question

  • I am using Expression Blend to edit XAML files as part of a fairly complicated WPF application. We have an external resource dictionary that we load at runtime and the new Blend 4 design-time resource dictionary feature has been a great help.

    My problem is that when the message box popped up asking "Would you like to select a resource dictionary to use at design time?" I accidentally clicked "Do not show again" and Cancel.

    Now I can't find a menu option or any other way to add a design-time resource dictionary. Can you please explain how to do this without the pop-up which I no longer have? Or can you explain how to reset the settings so the pop-up continues to appear?

    Also if there's a fix for the pop-up appearing over and over again, that would be helpful as well. I noticed that it will continue to add references to a design-time dictionary even though there already is one.

    I have tinkered with the .csproj files because I have one that does have a design-time dictionary but I can't seem to figure out how to get it right in there to make it work either.

    Thanks.

    - Chris

    Tuesday, July 27, 2010 4:34 PM

All replies

  • Hi Chris,

    Once you have at least one design-time resource dictionary in your project, the Resource pane will show you that dictionary under "Design time resouces". You can right click on that and add new design-time resources.

    If you never had any design-time resource dictionary and suppressed the dialog, you are pretty much out of luck :). The only option I can see is to delete the file where we store this setting - the .suo file that lives next to the .sln file. Then when you reopen the solution, you will be prompted again. Please keep in mind that deleting the .suo file might get rid of a few settings in your solution, but none of these should be detrimental to your working with the solution.

    Another option is the following - create a small project that has a missing resource. Then get Blend to prompt you for this dialog. Once you respond to the dialog, you can see the additions we make to the project file, that you can then duplicate elsewhere.

    Regarding the pop-up that keeps happenings, I would love to see a repro - you could send it to me directly at unnir at microsoft dot com.

    Thanks,
    Unni


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, July 27, 2010 6:58 PM
  • Tinkering around with the .csproj file was the way that seemed to work. Another question I have is what determines whether the pop-up appears? I created a new project and added some .xaml files for which I would like to use a design-time resource dictionary. The xaml files have missing resources but I get no pop-up when I edit them.
    Friday, August 6, 2010 4:58 PM
  • Hi Chris,

                   Any time you close and re-open a document Or you switch to a document with missing resources first time after opening a project you will be prompted with resolve design-time resources dialog. This is to make sure we don;t often prompt a user with this dialog.

    So, if you have a document with missing resources and you have NOT checked "Do not show this message again" checkbox then just closing and re-opening document should prompt you with this dialog.

    Hope this helps.

    --Navit Saxena

    Friday, August 6, 2010 6:37 PM