在设计视图上更改选项卡控件的选项卡项目

发布于 2024-08-20 18:21:23 字数 163 浏览 13 评论 0原文

我正在尝试将控件添加到设计视图上的另一个 TabItem ,但我只能看到第一个 TabItem 以及我之前添加的所有控件,目前我只能在代码视图窗口中通过硬编码添加控件,因此我必须编译程序才能看到通过硬编码添加的控件的结果。

任何帮助将不胜感激。

I'm trying to add control to another TabItem on design view, but I can only see the first TabItem with all the controls I previously added and at the moment I can only add controls by hard coding on code view window, therefore I have to compile the program in order to see the results of the controls added by hard coding.

Any help would be appreciated.

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

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

发布评论

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

评论(2

会傲 2024-08-27 18:21:23

我最近遇到了一个听起来像这样的问题,基本上设计者没有意识到您选择了第一个选项卡之外的其他内容。如果您转到该 tabitem 控件的属性对话框并将 IsSelected 属性设置为 True,则它应该显示该选项卡内容区域。

但是,我怀疑真正的问题是您没有安装 VS2008 SP1,因为他们用该更新修复了它。不幸的是Windows Update并没有告诉你SP1存在,甚至VS2008的菜单“帮助>检查更新”也没有告诉你它可用。你必须去;

http://www.microsoft.com/downloads/details.aspx microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en

自行获取。安装后,选项卡控件将按照您期望的方式工作。

PS:不要忘记 SP1 的 3 个安全更新,全部 500MB。 Windows Update 发现它们很好。

I ran into an issue recently that sounds like this, basically the designer isn't recognizing that you've selected something other than the first tab. If you go to the properties dialog for that tabitem control and set the IsSelected property to True it should display that tabs content area.

However, I suspect that the real problem is that you don't have VS2008 SP1 installed since they fixed it with that update. Unfortunately Windows Update doesn't tell you that SP1 exists, not even VS2008's menu "Help>Check for Updates" tells you it's available. You'll have to go to;

http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en

to get it yourself. After it's installed the Tab Control works the way you'd expect it to work.

PS: Don't forget the 3 security updates to SP1, all 500MB of them. Windows Update finds them just fine.

掩耳倾听 2024-08-27 18:21:23

正如 SnOrfus 所说,显然,当您开始进行一些硬编码时,它可能会产生一些冲突,尽管这对您来说并不常见,因为我可以在设计视图上创建选项卡控件、选项卡项并通过设计视图进行操作。

我的建议是,
1.- 检查您是否安装了 Visual Studio 的更高版本 Service Pack。 (检查VS2008的更新)
2.- 从头开始​​设计,仅在设计视图上工作。
3.- 尝试使用“Wrappanel”或“stackPanel”代替 tabitem 内的画布或网格(这将帮助您进行布局)。

如果您使用 WrapPanel,您可能需要查看滚动和换行其内容的行为。

希望这有帮助。

As SnOrfus says, apparently it may create some conflict when you start doing some hard coding although it is uncommon thing what happen to you as I can work on the design view creating tab control, tab items and manipulating trough the design view.

My recommendation would be,
1.- Check if you have install the later Service Pack for Visual Studio. (Check for updates for VS2008)
2.- Start over your design from fresh, working only on design view.
3.- Try to use "Wrappanel" or "stackPanel" instead of canvas or grid inside of tabitem ( that will help you with the layout).

If you use WrapPanel you may need to look at the behaviour of scrolling and wrapping its content.

Hope this helps.

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