简体   繁体   中英

Changing tab item of tabcontrol on design view

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM