Questions tagged [tabcontrol]

A tab control is a control in graphical user interface which contains multiple tab items that share the same space on the screen.

A tab control is useful for minimizing screen space usage while allowing an application to expose a large amount of data. It enables a developer to arrange visual content in a compacted and organized form.

References:

2206 questions
47
votes
5 answers

Stop TabControl from recreating its children

I have an IList of viewmodels which are bound to a TabControl. This IList will not change over the lifetime of the TabControl.
Mike
  • 920
  • 1
  • 9
  • 11
46
votes
21 answers

Hiding and Showing TabPages in tabControl

I am trying to show or hide tabpages as per user choice. If user selects gender male then form for male in a tabpage "male" should be displayed and if user selects female then similar next form should be displayed in next tab "female" I tried…
KoolKabin
  • 17,157
  • 35
  • 107
  • 145
45
votes
7 answers

Hide the TabControl header

What's the programmatic way (ie not using styles as in this question, but using code) to hide the TabControl header? I'll be glad for a snippet.
Elazar Leibovich
  • 32,750
  • 33
  • 122
  • 169
43
votes
2 answers

Hide Tab headers in WPF TabControl

What is the best way to hide Tab headers when there is only a single visible Tab? I want to hide TabControl chrome completely, while leaving the content of the Tab visible.
Andrey Shchekin
  • 21,101
  • 19
  • 94
  • 162
43
votes
6 answers

How to preserve control state within tab items in a TabControl

I am a newcomer to WPF, attempting to build a project that follows the recommendations of Josh Smith's excellent article describing The Model-View-ViewModel Design Pattern. Using Josh's sample code as a base, I have created a simple application that…
Tim Coulter
  • 8,705
  • 11
  • 64
  • 95
42
votes
2 answers

WPF TabItem Header Styling

I'm trying to style a TabControl and have got 75% of the way there, but I'm having difficulty styling the actual TabItems: What I am trying to achieve is remove the default ContentPresenter so that I can make the tab items partially transparent…
CatBusStop
  • 3,347
  • 7
  • 42
  • 54
37
votes
3 answers

How to easily reorder TabControl?

I have a TabControl which I have designed in the VS2005 designer that has about 7 tabs. How can I easily switch the order of the tabs around? I put one tab at the end in a rush, but now I want it somewhere in the middle.
CJ7
  • 22,579
  • 65
  • 193
  • 321
36
votes
1 answer

WPF: TabControl & DataTemplates

I just want to understand the following scenario. Where I am implementing a bound to a ObservableCollection No Data Templates When I don't have any DataTemplates, the text WpfApplication1.TabViewModel appears in the Tab…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
35
votes
4 answers

Close button in tabControl

is there anyone can tell me how to add close button in each tab in using tabControl in C#? i plan to use button pic for replacing [x] in my tab.. thank you
user380899
  • 351
  • 1
  • 3
  • 3
34
votes
6 answers

Set TabPage Header Color

Greetings, I have a tab control and I want to have 1 of the tabs have it's text color changed on a event. I've found answers like C# - TabPage Color event and C# Winform: How to set the Base Color of a TabControl (not the tabpage) but using these…
Theun Arbeider
  • 5,259
  • 11
  • 45
  • 68
33
votes
4 answers

WPF Tab Control: How do I get the currently selected tab?

In my tab SelectionChanged event (is this the correct event, I can't find a tab changed event?), how do I access the new tab? Also from outside this event in normal code, how do I access the currently selected tab? TabControl.SelectionChanged +=…
Bob
  • 4,236
  • 12
  • 45
  • 65
30
votes
1 answer

How to put WPF Tab Control tabs on the side

I am trying to create a Tab Control in WPF that has the tabs arranged down the right side of the control, with the text rotated 90 degrees The look is similar to those plastic tabs you can buy and use in a notebook. I have tried changing the…
Brian Stewart
  • 9,157
  • 11
  • 54
  • 66
29
votes
5 answers

WPF tab control and MVVM selection

I have a TabControl in an MVVM WPF application. It is defined as follows.
NZJames
  • 4,963
  • 15
  • 50
  • 100
28
votes
3 answers

Visual studio - TabControl.TabPages.Insert not working

Here's my code: public MainForm() { InitializeComponent(); MyServiceSettings obj = (MyServiceSettings)ConfigurationManager.GetSection("MyServiceSettings"); foreach (MyServiceConfigElement service in obj.Services) …
vIceBerg
  • 4,197
  • 5
  • 40
  • 53
27
votes
2 answers

WPF TabControl Databinding

I'm trying to build a WPF user interface containing a TabControl, and a TextBlock. I want to bind these two controls to an underlying collection of instances of the following class: class PageModel { public string Title {get;set;} public string…
mackenir
  • 10,801
  • 16
  • 68
  • 100