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
27
votes
4 answers

How to remove the default margin on the content of a TabItem?

I'm using the TabControl class in WPF and I've noticed that the content of each TabItem has a default margin of 4 pixels on all sides. Sample code:
Mal Ross
  • 4,551
  • 4
  • 34
  • 46
27
votes
1 answer

How to bind items of a TabControl to an observable collection in wpf?

What is the simplest example of binding the items of a TabControl to an ObservableCollection? Each tab's content will have unique data, and indeed this data will have observableCollections of its own bound to the items components. Currently I have a…
bluebit
  • 2,987
  • 7
  • 34
  • 42
24
votes
2 answers

C# TabControl TabPage Change

How do I change the tabpage being displayed in my tabcontrol programmatically?
Goober
  • 13,146
  • 50
  • 126
  • 195
24
votes
1 answer

TabControl.ItemTemplate: set TabItem.Header.Text to a MultiBinding with StringFormat

How do I set the TabItem.Header to bindings taken from few fields, each binding shown in a different size, all in the place of the original header text; without overriding the default style and behavior of the header - I only need the text. I tried…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
24
votes
4 answers

How to change background color of TabControl.Header

I need to change the background color of the TabControl header, but TabControl haven't property for it, how can I do it. Help me please. Here is my code:
Creative
  • 297
  • 1
  • 5
  • 9
23
votes
4 answers

How can I bind a List collection to TabControl headers in WPF?

I can get data into my TabControl but the headers have frames around them and I can't slick from tab to tab. What am I doing wrong with the XAML binding syntax on this TabControl? XAML:
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
21
votes
3 answers

Changing the text color of the selected tabItem in a TabControl?

In the second code there is a textBlock with the text "Mina övningar" How can I change the text color to black when the tabItem is selected? style: