WPF工具箱为空 [英] WPF Toolbox Empty

查看:120
本文介绍了WPF工具箱为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在添加到现有的WPF项目,并且遇到了一个奇怪的错误.我的工具箱为空.

I am adding on to an existing WPF Project, and am running into an odd error. My Toolbox is empty.

我正在Windows 7环境中使用以管理员身份运行的Visual Studios 2008进行开发.我从头开始创建了一个项目,工具就在那里.但是,当我加载现有项目时,工具箱"中没有工具.我确实在UI中选择了一个元素.

I am developing in a Windows 7 environment using Visual Studios 2008 run as Administrator. I have created a project from scratch, and the tools were there. However, when I load the existing project, there are no tools in the Toolbox. I do have an element in the UI selected.

我通过进入工具"->选择工具箱项..."->"WPF组件"来修复此问题.然后,我添加了所需的工具.之后,他们呆了一段时间.但是,我今天早上去添加了一个标签,并且工具箱是空的.我回到选择工具箱项"中,所有选择均被清除.我尝试再次选择所需的工具,但工具箱"仍然为空.当我回到选择工具箱项目"时,刚刚选择的项目已被取消选择.

I fixed this once by going into Tools -> Choose Toolbox Items... -> WPF Components. I then added the tools that I needed. After that, they remained for a while. However, I went to add a label this morning, and the toolbox was empty. I went back into Choose Toolbox Items, and all selections were cleared. I tried selecting the tools I needed again, but the Toolbox was still empty. When I go back into the Choose Toolbox Items, the items that I just selected have been unselected.

我尝试关闭和打开xaml窗口,选择工具后重新启动VS,重置工具箱,但这些都不是有效的.我知道它们在那里工作,因为在此应用程序之前我已经使用过它们.有人知道如何解决此问题吗?

I have tried closing and opening the xaml window, restarting VS after selecting tools, resetting the Toolbox, and none of these things have worked this time. I know they are there and work, because I have used them before with this application. Does anyone know how to fix this issue?

谢谢您的帮助.

推荐答案

工具->选项-> XAML设计器. 选中启用XAML设计器". 重新启动VS.

Tools -> Options -> XAML Designer. Check "Enable XAML Designer". Restart VS.

这篇关于WPF工具箱为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆