如何撤消“重置工具箱”在VS2008中?

发布于 2024-12-10 10:07:00 字数 1038 浏览 3 评论 0 原文

有没有办法在 Visual Studio 2008 中“取消重置”工具箱?

我试图让我的第一个 WPF UserControl 出现在工具箱中。我重建了我的项目,然后右键单击工具箱并从弹出菜单中选择“重置工具箱”;希望这会“刷新”控制列表(我现在知道得更好了)。唉,重置删除了 WPF 项目工具箱中的所有控件(对于 Win-Forms 项目仍然可以)。

那么有没有一种相对快速的方法将所有“标准 WPF 控件”恢复到工具箱?...我只有标准控件(作为 WPF 菜鸟),所以“不”我在点击之前没有进行备份重置开关...大叹息!

预先感谢大家,

基思。


编辑:为了记录我对问题的(某种)解决方案...

我拿回了我的 WPF 控件,但它们不在漂亮的单独工具箱中(即可扩展部分,或您所说的任何内容)他们)。嗯!它必须做;-)

要让它们回来...打开WPF窗口(例如Window1.xaml):右键单击常规“工具箱”,从弹出窗口中选择“选择项目...” -up 菜单,转到“WPF 组件”选项卡,选择所有项目并单击最后一项的复选框(使所有工具可见),然后单击“确定”按钮...然后(如果需要)右键单击工具箱并选择“对项目进行排序按字母顺序”然后回到右键-工具箱~选择项目~WPF组件;并取消勾选所有没有独特图标的项目(“默认图标”是一个带有蓝色边框的白色窗口,其中包含一个“圆锥体”,它似乎在吹红色气泡......瘾君子要小心吗?!?! )。您可能必须在列表的中间位置确定“取消勾选”,因为在“选择项目”对话框打开时您无法滚动工具箱(也可以看到图标)。

大家干杯。希望这对下一个 MS 受害者有所帮助。

基思.

PS:无论如何,我仍然认为这是 VS2008 中的一个“错误”...重置工具栏应该将它们恢复到原始状态。就我而言,其中包括“开箱即用”的 WPF 工具箱配置。我认为它丢失了它们,因为 WPF 工具箱的位置/是“附加”...实现为“自定义”工具箱(与用户定义的工具箱相同)。叹。

如果它在 VS2010 中仍然是一个“bug”,那么也许应该报告它,这样至少它(可能)不会传播到 2012 年,或者接下来发生的任何事情。

Is there any way to "un-Reset" the Toolbox in Visual Studio 2008?

I was trying to get my first-ever WPF UserControl to appear in the Toolbox. I rebuilt my project, then right-clicked on the Toolbox and chose "Reset Toolbox" from the pop-up menu; hoping that would "refresh" the control list (I know better now). Alas, the reset removed ALL the controls from the Toolbox for WPF projects (It's still OK for Win-Forms projects).

So is there a relatively quick way to restore all "the standard WPF controls" to the Toolbox?... I only had the standard controls (being a WPF noob) so "No" I didn't take a backup before I hit the reset switch... BIG Sigh!

Thanking you all in advance,

Keith.


EDIT: To document my (sort of) resolution to the problem...

I got my WPF controls back, but they're not in there nice seperate toolboxes (i.e. the expandable sections, or whatever you call them). Meh! It'll have to do ;-)

To get them back... With a WPF Window open (Window1.xaml for example): right-click on the General "toolbox", select "Choose items ..." from the pop-up menu, goto the "WPF Components" tab, select ALL items and click the checkbox of the last item (to make all tools visible), then click the OK button... then (if you want) right-click on the toolbox and select "Sort Items Alphabetically" then go back into right-click-Toolbox ~ Choose Items ~ WPF Components; and untick all those items which don't have distinctive icon (the "default icon" is a white window with a blue border containing a "cone" which appears to be blowing red bubbles... stoners beware?!?!). You'll probably have to OK your "unticks" half-way down the list, coz you can't scroll the toolbox (too see the icons) whilst the Choose Items dialogue is open.

Cheers all. Hope this helps the next MS Victim.

Keith.

PS: For what it's worth, I still think this is a "bug" in VS2008... Resetting the toolbars should retore them to there original condition. Which, as far as I'm concerned, includes the "out of the box" WPF toolbox configuration. I presume it's lost them coz the WPF Toolbox's where/are a "tack on"... implemented as "custom" toolboxs (the same as a user-defined toolbox). Sigh.

If it's still a "bug" in VS2010 then maybe it should be reported, so that atleast it (probably) won't be propagated to 2012, or whatever comes next.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尹雨沫 2024-12-17 10:07:00

您是否尝试在 VS2008 命令提示符中运行此命令

del "%LocalAppData%\Microsoft\VisualStudio\9.0\*.tbd"

- 请参阅此链接 - http://msmvps.com/blogs/coad/archive/2010/05/07/reset-the-visual-studio-toolbox.aspx

据此,它将重新填充数据。

Did you try running this command in VS2008 Command Prompt-

del "%LocalAppData%\Microsoft\VisualStudio\9.0\*.tbd"

Refer to this link - http://msmvps.com/blogs/coad/archive/2010/05/07/reset-the-visual-studio-toolbox.aspx

As per this it will re-populate the data.

迷鸟归林 2024-12-17 10:07:00

现在可能有点晚了,但我发现如果我更改环境设置等并想要将它们恢复,我会在关闭其他 Visual Studio 实例之前打开 Visual Studio 的第二个副本。然后关闭您更改的版本,然后立即关闭第二个版本。

这通常会保留上次关闭实例的设置以供下次打开。

It's probably a bit late now, but I find if I change environment settings etc and want to get them back I open a 2nd copy of Visual Studio before I close the other Visual Studio instance. Then close the one you changed and then immediately close the 2nd version.

This normally persists your settings from the last instance closed for next time opening.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文