Visual Studio Developer Center > Visual Studio Forums > Visual Studio WPF Designer > Cannot edit WPF application in design view in Visual C# 2008 Express - all tools greyed out
Ask a questionAsk a question
 

AnswerCannot edit WPF application in design view in Visual C# 2008 Express - all tools greyed out

  • Thursday, July 02, 2009 10:10 PMk0065126 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have installed Visual C# 2008 Express on my Vista and Win7 RC1 computers.  It appears to work correctly on Vista.

    If I create a WPF Application, or load one supplied with the book 'Microsoft Visual C# 2008 Step by Step' I have a problem on Win7.

    There is no way I can add a control to the form because the tools in the toolbox are all greyed out.  I have ensured that I am clicking the title bar of the form and the Properties window shows System.Windows.Window.  If I edit the Title property that is reflected in what is displayed in the form, and I am able to edit the XAML window below the Form Designer to add controls but the tools are still greyed out.

    I did try a repair install but nothing changed, even when I used Compatablity Mode.  I have also tried uninstalling C# and all other Visual Studio components which installed at the same time and then re-installing C# but that did not solve the problem.  Also I have noticed that the Recent Projects list is still populated with the same programs which were there before I did the uninstall, suggesting that the uninstall was incomplete.

    When I did the re-install using vcssetup.exe I used compatability mode (Vista SP20), and have tried running C# in compatability mode as well.  Neither of this helped.

    Can anyone suggest what the problem is please, and how to overcome it, as I have run out of ideas.

    Viv

Answers

  • Friday, July 03, 2009 8:13 PMk0065126 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I have now found the answer.  Go to Tools, Choose Toolbox Items..., select the WPF Components tab (not sure if this is necessary), then click the Reset button.  The buttons are no longer greyed out.

    Viv

All Replies

  • Friday, July 03, 2009 3:42 PMFrankenspank Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This is a shot in the dark, but try running

    devenv /setup

    This will reset all the packages to default values as well as reset the toolbox. Also are you running the 32 or 64 bit version of Vista?  You might have to changes the flags in the project file to be sure it is set to compile for the correct platform.

    Frank
  • Friday, July 03, 2009 6:55 PMk0065126 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This is a shot in the dark, but try running

    devenv /setup

    This will reset all the packages to default values as well as reset the toolbox. Also are you running the 32 or 64 bit version of Vista?  You might have to changes the flags in the project file to be sure it is set to compile for the correct platform.

    Frank

    Thanks for the suggestion, Frank.

    I have tried running 'devenv /setup', 'devenv/setup' and 'devenv.exe/setup' in Command Prompt as administrator but just get a message that 'devenv' or 'devenv.exe' is not recognized as an internal or external comman, operable program or batch file.  Can you tell me what I am doing wrong?

    Thanks,

    Viv
  • Friday, July 03, 2009 8:13 PMk0065126 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I have now found the answer.  Go to Tools, Choose Toolbox Items..., select the WPF Components tab (not sure if this is necessary), then click the Reset button.  The buttons are no longer greyed out.

    Viv
  • Wednesday, July 08, 2009 1:44 AMMark Wilson-ThomasMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Glad you have found an answer: this issue can be caused when your toolbox database files become corrupted. Resetting the toolbox as you have discovered often fixes the issue.
    Mark
    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'