Microsoft Developer Network > 포럼 홈 > Visual Studio WPF Designer > Cannot edit WPF application in design view in Visual C# 2008 Express - all tools greyed out
질문하기질문하기
 

답변됨Cannot edit WPF application in design view in Visual C# 2008 Express - all tools greyed out

  • 2009년 7월 2일 목요일 오후 10:10k0065126 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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

답변

  • 2009년 7월 3일 금요일 오후 8:13k0065126 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    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

모든 응답

  • 2009년 7월 3일 금요일 오후 3:42Frankenspank 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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
  • 2009년 7월 3일 금요일 오후 6:55k0065126 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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
  • 2009년 7월 3일 금요일 오후 8:13k0065126 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    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
  • 2009년 7월 8일 수요일 오전 1:44Mark Wilson-ThomasMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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'